Closed ForestRingGames closed 6 years ago
Unfortunately we can't hook the application lifecycle on Android (on iOS we use method swizzling on the app delegate) so you need to call dynamic_links::Fetch() when the app gains focus to get the link.
Thank you so much, this works!
Really cool support here :) In case you want to add it to the documentation, I followed these guides here: https://firebase.google.com/docs/dynamic-links/android/receive https://firebase.google.com/docs/dynamic-links/cpp/receive
Maybe it'd be cool to add this piece of info to these guides, so people will not make the same mistake in the future.
A note was added to the bottom of: https://firebase.google.com/docs/dynamic-links/cpp/receive
"Note: On Android you must also call Fetch() when the application gains focus in order for the listener to be triggered."
We've setup dynamic link creation both on iOS and Android with the Firebase Dynamic Link C++ SDK. All is working perfectly fine on iOS, links get received and the Listener is triggered whether the App is closed before or not. This is our Listener code:
App Init:
Also our manifest setup:
On Android, the log is only triggered when the App was not open previously. If the App was open, then clicking the Link also does correctly open the App, but the listener is not triggered / no log ist printed.
Do you have any idea why this is happening and how we can also make the listener trigger if the app is already open like on iOS?