207
Views
4
Comments
Solved
[OneSignal Plugin] Notification with deep link create a new instance on Android
Question
onesignal-plugin
Mobile icon
Forge asset by OutSystems

I send a notification with a Deep Link to open a specific screen in my app. 

Works fine in iOS. But in android (I tested in version 7 and 9) when I open the notification, a new instance is created... I have the same application opened n times.

If I send 3 notifications, I will have 3 equal apps opened.


Thanks!

2023-08-01 10-02-28
Adriano Ramos
Staff
Solution

Hello Paulo,

Have you included the code snippet below in your application, according to this documentation?

{
    "preferences": {
        "android": [
            {
                "name": "AndroidLaunchMode",
                "value": "singleTask"
            }
        ]
    }   
}
2024-12-02 12-15-17
Aravind EONE

Hi Paulo,

Why can't you try FCM for cloud messaging?

Actually I tried installing one signal on my application and took dependancy, but I could not generate the app build itself.

It halted by saying some Cordova errors.


https://firebase.google.com/

2025-01-07 17-06-54
Paulo Cação
Champion

Aravind M wrote:

Hi Paulo,

Why can't you try FCM for cloud messaging?

Actually I tried installing one signal on my application and took dependancy, but I could not generate the app build itself.

It halted by saying some Cordova errors.


https://firebase.google.com/

Thanks for reply. I use firebase for others situations, but I really need the OneSingal plugin to send push notifications.

2023-08-01 10-02-28
Adriano Ramos
Staff
Solution

Hello Paulo,

Have you included the code snippet below in your application, according to this documentation?

{
    "preferences": {
        "android": [
            {
                "name": "AndroidLaunchMode",
                "value": "singleTask"
            }
        ]
    }   
}
2025-01-07 17-06-54
Paulo Cação
Champion

It works! 

Thanks

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.