Skip to content Skip to sidebar Skip to footer

Gcm Using Json To Send To Multiple Registrationids : No Notification Arrives

I'm using Android Google Cloud Messaging to send notifications to a device, with c#.net. I got the API Key, RegistrationID and senderID ( Well first method worked no there's nothin

Solution 1:

Changing

Request.ContentType = " application/x-www-form-urlencoded;charset=UTF-8";

to

Request.ContentType = "application/json";

Does answer the question.

He is providing JSON data where he has explicitly implied quite the opposite.

The HTTP header must contain the following headers:

Content-Type: application/json for JSON; application/x-www-form-urlencoded;charset=UTF-8 for plain text.

See: https://developer.android.com/google/gcm/http.html

Solution 2:

Use

Request.ContentType = "application/json";

Solution 3:

Replace this line:

Request.ContentType = "application/json";

Post a Comment for "Gcm Using Json To Send To Multiple Registrationids : No Notification Arrives"