Hello. I have a phonegap app that receives push notifications. I am suscribed to push-notification event, but it only fires when user clicks on notification bar, and I want to display message directly in the app when the push is received (when app is open). How I can do it? Thanks

document.addEventListener('push-notification', function(event) {
                               //get the notification payload
                                var notification = event.notification;
                                //display alert to the user for example
                                //clear the app badge
asked 09 Sep '15, 09:47
fjluque's gravatar image


Add the following setting to your Info.plist file: "Pushwoosh_SHOW_ALERT" => "NO"

This will suppress the alert and will trigger callback automatically when push notifications arrive when the app is open.

permanent link
answered 09 Sep '15, 11:05
shader's gravatar image


Your answer
toggle preview

Follow this question

By Email:

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



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:


question asked: 09 Sep '15, 09:47

question was seen: 1,311 times

last updated: 09 Sep '15, 11:05