I am having really hard time configuring correctly Firebase Dynamic Links in Android. (The same dynamic links works fine in iOS)
I created a dynamic link from Firebase console. The generated link is something like this:
https://myexample.page.link/XzPY
This is the configuration in Firebase:
In the manifest I added this intent filter:
<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:host="myexample.page.link"
android:scheme="https" />
</intent-filter>
Also the behaviour for Android have been set to "Open the deep link in your Android App".
This is the part that is supposed to handle the dynamic link in my Activity:
Firebase.dynamicLinks
.getDynamicLink(intent)
.addOnSuccessListener(this) { pendingDynamicLinkData -> // ALWAYS NULL!
var deepLink: Uri? = null
if (pendingDynamicLinkData != null) {
deepLink = pendingDynamicLinkData.link
}
}
If I try to open the link from the browser (from my laptop) I see that it is redirected to the right page. If I try to open the same link from Android I see two wrong things:
- The link doesn't redirect me to the app, but shows me the option to select the App or the Browser.
- If I select the app the pending dynamic link data is always null.
