After enabling multiple push notifications in android phonegap app, only latest notification data is available

Comments

5 comments

  • Avatar
    Dmitry Dyudeev

    Hello,

    Am I correct that you are referring to Custom data?

    Actually, the normal behaviour is that you can press any notification, and the Custom data would be successfully delivered. So, most probably, there is something wrong with the code of the application.

    Aside from that, please note that at the moment Pushwoosh supports only PhoneGap 3.0 and above, so if you are using an outdated version, it might cause the issue.

  • Avatar
    mahesh_w

    @ Dmitry Dyudeev: Yes, you are right. I am referring to custom data. Using cordova-2.2.0.jar library and cordova-2.2.0.js file in project.

    I searched for downloading cordova 3.0 or above jar file but didn't got any reference. Can you please provide link for downloading latest cordova jar and js file.

  • Avatar
    raj dhiravani

    How to get the notification data when application is running in background and even if user dont click the notification ?

  • Avatar
    mahesh_w

    @Dmitry Dyudeev: Using latest PhoneGap version solved my problem.

    Added following line in Android code

    pushNotification.setMultiNotificationMode(); // pushNotification - Pushnotification Plugin Object

  • Avatar
    raj dhiravani

    I tried your solution but its not working.

    Saving to window.localStorage works if the app is already open when the notification arrives, but when the app is closed those methods will not get called. This will only happen if the user taps on the notification, which then opens the app.

    Is there a way to save notification data to the app's localStorage even if the user dismisses the incoming push notification?

    A work-around would be to store all notifications on a server and make the app retrieve them on opening, but I don't want to make the app slower by making unnecessary requests.

Please sign in to leave a comment.