I am trying to make my cordova app open to a specific page when the user clicks on a push notification. This works great when the app is running in the background. However if I kill the app and try to open the notification the push-notifcation event isn't triggered. Is this a limitation of the plugin or am I doing somthing wrong?

    var pushNotification = cordova.require("com.pushwoosh.plugins.pushwoosh.PushNotification");
    document.addEventListener('push-notification',
        function(event)
        {
    var title = event.notification.title;
    var userData = event.notification.userdata;

    //If push contains text run script to change page

        if (title.indexOf("Time to do your") > -1){


        alert("going to two choices");
            loadAndGotoTwoChoices();
 }

}

asked 12 Aug '15, 19:10
Arda%20Cole's gravatar image

Arda Cole
11

Hello,

Could you please let us know which platform is in question? It would be also helpful for us to investigate if you could provide the console log from your device to our support team.

permanent link
answered 14 Aug '15, 06:36
Max%20Kuzakov's gravatar image

Max Kuzakov
4165

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×190
×165
×12

question asked: 12 Aug '15, 19:10

question was seen: 1,213 times

last updated: 14 Aug '15, 06:36