I am trying to dynamically inject the url schema and path into my AndroidManifest.xml file using build.gradle as referenecd here
However, this does not allow deeplinks to trigger.
I tested my deeplinking works when I use static values in the AndroidManifest.xml.
// AndroidManifest.xml
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data
android:scheme="${appScheme}"
android:host="${hostName}"
android:path="/path2" />
<data
android:scheme="${appScheme}"
android:host="${hostName}"
android:path="/path1" />
</intent-filter>
// build.gradle (:app)
defaulConfig {
manifestPlaceholders = [
hostName: "www.host_name.com",
appScheme: "https"
]
}
demo {
resValue "string", "hostName", "www.host_demo.com"
resValue "string", "appScheme", "https"
}
staging {
resValue "string", "hostName", "www.host_staging.com"
resValue "string", "appScheme", "http"
}
However, this does not allow deeplinks to trigger.
? is it not working with resValue defined on each flavor? – Kreisler