4

I'm using PushWoosh services for handling push notifications on my PhoneGap based app.

But i have a problem with handling native push messages.

If i send the push notification over PushWoosh API or Management Panel it comes to device like this:

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

But if i send the push notification via Google Native Push Services with this payload:

{"title":"test title"}

It comes to device as:

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

So this cause the title not shown on the notification ğanel if i send the push message over Google Services.

Here's my question: How can resolve this? What is the best way to show title on notification panel with sending message via Google?

Edit:

I found the problem on myself :) My code was using json_encode as twice to encode the message. I remove one of them and the problem was resolved.

hardc0der
  • 449
  • 2
  • 7
  • 13

0 Answers0