Open kajic opened 3 years ago
Hello @kajic, I'm having a similar issue, the onDynamicLinkCallback isn't called when the app is running in the background. The callback is only called when the app isn't already running. Did you find a solution to this problem?. Any help will be greatly appreciated.
Best Regards.
Hey @jfrcv5 and @kajic - did you find any solution for this?
I've noticed that the
onDynamicLinkCallback
is only called when our app is not running in the background. I.e. the callback is only called when the app isn't already running. Once the Android app has been started and is running in the background, the callback doesn't get called anymore. To be clear, tapping a dynamic link switches to our app, but the callback itself is absent.We only have this problem on Android.
We're using dynamic links for onboarding new users, so this isn't a catastrophic problem (since they typically don't have the app running when they tap a dynamic link), but I wanted to ask if this is the intended behavior anyway and hopefully understand what the problem is.
Our packages: "@nativescript/core": "~8.0.7", "@nativescript/firebase": "^11.1.3", "@nativescript/android": "8.0.0",
We're running node v14.15.1 and npm v7.5.6.
It's also worth mentioning that since our app is a game, we run with
android:launchMode="singleTask"
. Running with launchModestandard
alleviates the problem, because each dynamic link tap launches a new instance of the app inline inside the app where the dynamic link was tapped. But we would really prefer not to allow multiple instances of our app to be running, and think that thesingleTask
launchMode is the most appropriate in our case.Grateful for any advice on how to troubleshoot this! Thanks!