I am using PhoneGap build + jQuery Mobile (1.4+) with this plugin: http://www.pushwoosh.com/programming-push-notification/ios/ios-additional-platforms/push-notification-sdk-integration-for-phonegap/

It works all fine for me, what I want to do though is be able to send a jQuery mobile URL (example #test) in custom data which is sent as 'JSON'? Then jQuery Mobile will load the jQuery Page in the app.

Could someone show me how I could implement this? At this stage I have:

//push notifications handler

document.addEventListener('push-notification', function(event) { var notification = event.notification; // navigator.notification.alert(notification.aps.alert);

        //to view full push payload
        // navigator.notification.alert(JSON.stringify(notification));

        //reset badges on icon


Assuming my custom data is: {"url" : "#test"} would someone know how i can use this to make the app go to query page #test?

Thanks, Ben

asked 29 Jan '14, 05:27
iB3nji's gravatar image


Add InAppBrowser plugin and put this code in document.addEventListener('push-notification', function(event)

var url = notification.u.url;
window.open(url, '_self');
permanent link
answered 29 Jan '14, 12:59
Fectum's gravatar image


Thank you so so much this worked for me!

var url = notification.u.url; $.mobile.changePage(url, { transition: "slideup"} );

permanent link
answered 30 Jan '14, 00:20
iB3nji'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: 29 Jan '14, 05:27

question was seen: 2,306 times

last updated: 30 Jan '14, 00:20