Sunday, 1 September 2013

Correct JSON format for GCM message

Correct JSON format for GCM message

heres my JSON
var postData =
"{ \"registration_ids\": [ \"" +
pushNotificationState.RegistrationId + "\" ], "+
"\"data\": {\""+
pushNotificationState.NotificationData.NotificationData
+ "\"}";
registration Id and notification data are variables. I'm getting a 400
response from the GCM sever saying JSON is incorrect format. Can anyone
pick where I have gone wrong?
Cheers

No comments:

Post a Comment