Start a new topic
Answered

Phonegap Push Notification - Message displayed as raw json

Hello all,


I would like to know if other people have found a solution in order to display the phonegap push notification correctly with Kinvey.


When I use the push.sendPayload() method, the notification is sent in the form: message: "{...}"

So the message contains the string version of the json object we're passing.

The problem is, in the phonegap-plugin-push, the message is passed as-is to the notification code and displays the json as message in the notification center.

They fixed the problem for other providers by going through the extras, but since Kinvey send the payload as "message" in place of "data" or "alert" or something else, it doesn't work.


Is there a way to send the payload as a "data" notification in place of a "message" notification?


Does anyone have a working fork of phonegap-plugin-push compatible with Kinvey?

Preferably on npm that I can use in phonegap build.


Thanks in advance.



Best Answer

If you change to this plugin it fixes the problem https://github.com/KinveyApps/phonegap-plugin-push


I had the same issue as you and switching plugin (with out changing my code) fixed the issue


Thanks Aldan, I will try that and see how it goes from there!

Answer

If you change to this plugin it fixes the problem https://github.com/KinveyApps/phonegap-plugin-push


I had the same issue as you and switching plugin (with out changing my code) fixed the issue

Login or Signup to post a comment