I have a problem that firebase dynamic link is relaunched when the android app is restarted. The following sequence produces the problem:
- click the deep link URL
- the app is opened at the view pointed by the deep link (as expected)
- close the app (completely)
- open the app from the icon
- the app is opened at the view pointed by the deep link (even though it should not)
- after that it works fine
I am using the latest (9.0.2) libraries. The code is pretty much as in the examples (e.g. here: https://firebase.google.com/docs/dynamic-links/android#add-an-intent-filter-for-deep-links), autoLaunchDeepLink being false.
I noticed that there has been a bug causing this, but it should be fixed in the current release: https://github.com/googlesamples/google-services/issues/141
I tried a workaround by calling AppInvite.AppInviteApi.getInvitation twice, as instructed in github error report. No success.
In onCreate I am checking that savedInstance is null and checking deep link only if it is.
I am checking deep link also in onNewIntent in order to handle it while the app is running, however this is not called when the problem occurs.
In my manifest, the intent-filter with the specific protocol and host are included only in the main activity. The protocol is used also in other filters in other activities, but I tried also using different protocol in those with no effect. Only the main activity uses AppInvite.AppInviteApi.getInvitation to get the intent. The problem occurs even if I remove other intent filters from all activities.
Any ideas what could be wrong or what I should still check?