Recently I had to implement GCM in a project. I would like to share my learning on this that would definitely help others
Attached with the blog you can find the GCMDemo.apk for Android. Its an sample app that Google provide with android sdk.
Following are the steps to get message from GCM on this App:
- Launch the GCMDemo application after installation. When the application would launch,it will show the registration ID which is actually the device token. It would be like APA91bGtMNMK2YYpNXwbH0EhStvKRGxhs3Qc2gAdFLJUaY81tzxHIfLMjPFYYrUhjAd9WWD6HyTpd0SVHxydrTG5R-x0MQjQZcnlS8NelCbf9KU7VflP3cDP6d4kbUNO1g8F-rIZrioo39yQGs1Rbe_lVauNwTvVh07PngDD1Z9BTlRra3_zQlk
- To test the GCM go to http://helmibaraja.com/gcm_demo.html. And enter following three information and then submit the inform. As soon as you submit the form the message would appear on device(Both on notification Area as well as in the App):
- api Key (Browser key): Enter “llIzaSyBuM2dddjXoT0c5n77tjNMY-bxvdtJv9i” (without quotes)
- Registration ID: This would be the device token that we copied from the GCMDemo Android App above.
- Message: This would be the text of the message you want to send using GCM to android device.