I am using the phonegap plugin with cordova 3.4.0 on an android.

In the push-notification event handler the event.notification.userdata is only vald if the app is in the foreground when the push notification is received.

If the userdata that I send is {"m":"value"} the userdata will have an "m" property when the app is running, but when the app has to be started first by tapping on the message the "m" property does not exists.

When the event handler is defined as:

document.addEventListener('push-notification', function(event) { alert(JSON.stringify(event.notification)); });

If the app is running the alert will display

{"u":"{\"m\":\"value\"}", "userdata":{"m":"value"},"title": etc.

If the app is started or put in the forground the alert will display

{"u":"{\"m\":\"value\"}", "userdata":{\"m\": \"value\"},"title":

The quotes around "m" and "value" are now escaped with backslashes.

event.notification.userdata.m will now be "undefined"

asked 20 May '14, 01:37
heinijustinussen's gravatar image

heinijustinu...
113

Hello, please note that I have responded to your support ticket several hours ago - our developers have provided a new Pushwoosh.jar file. Please let us know about the results, so we could update the .jar in case everything works.

(20 May '14, 09:15) Dmitry Dyudeev Dmitry%20%20Dyudeev's gravatar image

Has new Pushwoosh.jar file already been deployed since we're are experiencing the same problem.

permanent link
answered 12 Jun '14, 07:53
robice's gravatar image

robice
111

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
×190
×165

question asked: 20 May '14, 01:37

question was seen: 1,023 times

last updated: 12 Jun '14, 07:53