If you are not familiar with GCM please refer this url to get an idea before starting this tutorial.
When you are sending a push notification from the server you need to know the device registration id first. Device registration ID can be stored when the device is registered. Here I assume you all know the device IDs.
Downloading the SDK
- Use this url to download gcm-server-1.0.1.jar
Now you only need to import the library and call some methods, that’s all. For an example I’ve implemented a Jax-RS server. Note that you have to provide the API key and the Device registration ID in order to send push notifications.( Please refer this url if you have any doubts on getting the API key from GCM.)