Custom pushwoosh message processing

I use PushWoosh services to handle push notifications in a PhoneGap-based application.

But I have a problem processing my own push messages.

If I send a push notification through the PushWoosh API or the control panel, it arrives on the device as follows:

{"title":"test message","collapse_key":"do_not_collapse","from":"400481817113","onStart":false,"foreground":true,"p":"["}

But if I send a push notification through Google Native Push Services with this payload:

{"title":"test title"}

It comes to the device as:

{"message":"{\"title\":\"test title\"}","collapse_key":"do_not_collapse","from":"400481817113","onStart":false,"foreground":true}

Thus, the title does not appear in the notification if I send a push message through Google services.

Here is my question: how can this be solved? What is the best way to show the name in the notification bar with sending a message via Google?

Edit:

:) json_encode . , .

+4

Source: https://habr.com/ru/post/1544724/


All Articles