[OneSignal Plugin] Notification with deep link create a new instance on Android

Forge Component
(13)
Published on 2019-10-18 by OutSystems R&D
13 votes
Published on 2019-10-18 by OutSystems R&D

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!

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/

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.

Solution

Hello Paulo,

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

{
    "preferences": {
        "android": [
            {
                "name": "AndroidLaunchMode",
                "value": "singleTask"
            }
        ]
    }   
}
Solution

It works! 

Thanks