2

I just figured out how to implement android c2dm client but on the server side i have some troubles. I made search running through the internet but all the samples are too complicated for me or they are written down in python. I need some basic samples for server side in C# or java. Could you suggest anything for me ? Thanks.

Adinia
  • 3,722
  • 5
  • 40
  • 58
Mustafa Irer
  • 45
  • 1
  • 5

2 Answers2

0

http://code.google.com/android/c2dm/index.html#server

This basically has the required info, and the steps needed to take to send a message to the Google C2DM servers.

Basically, you're going to use C#'s URL fetching library to send a POST request to https://android.apis.google.com/c2dm/send, which includes in the body of the POST the variables listed on the code.google.com page I linked to above.

I'm not going to post sample code, but if you look on google for "C# How to send POST request," you'll know HOW to send a POST. You now know WHERE to send the POST, and you now know WHAT you need to send to the POST URL.

You just need to implement that now.

Crowe T. Robot
  • 2,045
  • 17
  • 18
0

Came across this question, and this answer.

https://github.com/Redth/C2DM-Sharp

Works a treat for me, decent code, easy to understand.

Dean Thomas
  • 1,096
  • 1
  • 10
  • 25