If im in my app and send a push it comes up in an alert box?

The header is index.html with the message under? So not a proper notification?

asked 16 Jul '14, 19:41
Mark%20Latham's gravatar image

Mark Latham

I believe this is the correct functionality. If you wish to change the way the notification is displayed you can make changes to the following code.

document.addEventListener('push-notification', function(event) {
    var title = event.notification.title;
    var userData = event.notification.userdata;

    console.warn('user data: ' + JSON.stringify(userData));
    alert(title);  // CHANGE THIS LINE OF CODE

It sounds like you wish to add the message to the DOM of your index.html page. You can do that using code like this:

permanent link
answered 24 Jul '14, 02:59
synergywdeveloper's gravatar image


If using Phonegap Build:

Add to Config.xml the Plugin:

"org.apache.cordova.dialogs" version="0.2.6" />

Update PushwooshiOS.js:

document.addEventListener('push-notification', function(event) {

        //get the notification payload
        var notification = event.notification;

         //ADD the Dialogs Plugin Function

        //DISABLE the iOS Native Alert Function
                    //display alert to the user for example

        //to view full push payload

        //clear the app badge
permanent link
answered 12 Oct '14, 02:59
safadig's gravatar image


edited 12 Oct '14, 03:00

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: 16 Jul '14, 19:41

question was seen: 2,604 times

last updated: 12 Oct '14, 03:00