question, when I sent a notification to a active application with a deeplink, the app restarts and opens the default home page (Android), on iOS its resuming to the deeplink. I read something like setting the launchmode to singleInstance. Someone already fixed this?
see for example
- android - Bring a singleInstance Activity Back Using a Notification - Stack Overflow
when the application is inactive, both Android and iOS apps work fine, clicking the notification opens the app on the deeplink page.
Hello Matthias,
Thank you for your question.
To better understand the behaviour you're experiencing, could you share a few more details?
I just tested this scenario with our Firebase Sample App that uses the Cloud Messaging Plugin on a Pixel 7 device running Android 16 and it works properly.We will be waiting for your feedback on this matter.
Best regards,
Alex Jacinto
This app is using Cordova Batch plugin and using Batch.com SDK; notification is sent from Batch.com debug console.
- Application is not active, and notification is sent with deeplink ==> working in iOS and Android, app is opened and opens the deeplink url
- Application is active (in back or foreground) , and notification is sent with deeplink ==> working in iOS opens the deeplink url on Android app is restarting (new instance) and starts on homepage of the app (ignoring the deeplink)
Thanks for getting back to us!
How are you passing the deeplink in the Notification parameters though? Can you share a screenshot?
You might want to use the "DeepLink" attribute of the "Notification" structure instead (see attached image).
Simply pass the name of the screen you want to navigate to after clicking the notification. Then, your app must handle the "NotificationClicked" event in a client action, and that's where you can check the "ScreenName" input parameter to know what screen you should navigate to.The Firebase Mobile Sample App available on Forge has this use case implemented in UI Flows -> Common -> Layout -> NotificationsHandlerNotificationClicked, in case you want to have a look.Best regards,