I have a phonegap app and I want to know if the pushwoosh phonegap plugin supports a way of letting my app know if it was resumed because of the user did slide a notification in the ios notification area.

Thanks!.

asked 27 May '14, 02:06
bapemos's gravatar image

bapemos
11

Yes, pushwoosh plugin supports this. Push dictionary in notification handler contains key "onStart" if this is happening on app start. So you can handle this like that:

//set push notification callback before we initialize the plugin
document.addEventListener('push-notification', function(event) {
                          //get the notification payload
                          var notification = event.notification;

                          //display alert to the user for example
                          alert(notification.aps.alert);

                          if (notification.onStart) {
                              //push notification is displaying on application start, do here something what you need
                          }
                          });
permanent link
answered 28 May '14, 11:42
Fectum's gravatar image

Fectum
2604

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:

×446
×353
×165

question asked: 27 May '14, 02:06

question was seen: 1,263 times

last updated: 28 May '14, 11:42