I need a sample application for Google Cloud messaging. with a sample server to test my app. can any one help me on this?
I need a sample server to test my code i al
"curl" command line tool can be used to send messages to devices registered with GCM.
curl -X POST \
-H "Authorization: key= <YOUR_AUTHORIZATION_KEY>" \
-H "Content-Type: application/json" \
-d '{
"registration_ids": [
"<YOUR_DEVICE_TOKEN>"
],
"data": {
"message": "<YOUR_MESSAGE>"
}
}' \
https://android.googleapis.com/gcm/send
Please refer to this blog post for further details. http://www.zinniakhan.com/2014/07/check-google-cloud-messaging-gcm-client.html.
We have a sample client up on GitHub: https://github.com/indigorose/airbop-client (based on the GCM client sample), which works with our GCM-based service AirBop: http://www.airbop.com Which you can test with for free.
You need to download via Android SDK. go to Window->Android SDK Manager. scroll down to extra and check "Google Cloud Messaging" and install.
after completed, you may check at : android-sdk/extras/google/gcm/samples
or you could try this (I've uploaded myself) : gcm
for server side, check on this answer : https://stackoverflow.com/a/11253231/554740
I found an open-source sender client for windows here: https://gcm.codeplex.com/