Open burnermanx opened 6 years ago
@burnermanx thanks for reporting this, I see the same behavior. I'll go find out if this is a docs bug or a product bug.
Hi @samtstern , i am facing the same issue (dynamic links getting called even after exiting and reopening app from recents) in my project. Do we have a solution yet?
Though it is definitely the bug, there is something you can do:
Firstly, call it onCreate()
of the activity.
Secondly, if you handle dynamic links in onNewIntent()
- method you can check if intent in getIntent().getData()
and pendingDynamicLinkData.link
are different you can decide which one to open.
Environment: Android device: OnePlus 5 A5000 Android OS Version: 8.1 (27) Google Play Services version: 11.8.0 Firebase/Play Services SDK version: 11.8.0
According by Dynamic Links docs:
For compatibility issues for devices which not supporting App Links, I'm loading Dynamic Links on main activity and routing to desired activity according Uri. So what I did:
In routeDeepLinkIntent(activity, uri) (very simplified)
And works flawlessly, but, if I go back to previous activity, .getDynamicLink(getIntent()) will return dynamic link again and the process will repeat some times until stops. So the behavior is different from documentation.
If I put the code in onCreate(), dynamic link will works, but, if app is already opened, dynamic link will not work. Ok, because I ran .getDynamicLink(getIntent()) on onCreate, so activity is already created and getDynamicLink() will not be called.
How can I fix this, if possible?