'Dynamic link receive in different format in android and not able to extract payload
Step 1: Describe your environment
Android Studio version: Arctic Fox 2020.3.1, Firebase Component: firebase-dynamic-links-ktx:21.0.1
Step 2: Describe the problem
Below are two different links received in the android app.
- https://xxxxx.xxx/sing?userid=16&ref=102323&intro=1&spkr=1
- https://xxxxx.page.link/go16
- The first link(full) was received when I install the app from the play store through the dynamic link. And this link is not getting the payload.
- The second link(sort) was received when the app was already installed and I clicked on the dynamic link. This link is able to get the payload.
Relevant Code:
Firebase.dynamicLinks
.getDynamicLink(myNewIntent)
.addOnSuccessListener(this) { pendingDynamicLinkData ->
// Get deep link from result (may be null if no link is found)
var deepLink: Uri? = null
if (pendingDynamicLinkData != null) {
deepLink = pendingDynamicLinkData.link
}
val userid= deepLink?.getQueryParameter("userid")
handleIntentLink(deepLink, userid)
}
.addOnFailureListener(this) { e ->
Log.e("addOnFailureListener", "$e.message")
}
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
