I tried the code for GCM given here
Using this I am able to get the registration id for my application (I checked on the device and found it got printed onto the TextView
that I set).
But now how can I check for the receiving of messages (push notifications) from the server. Actually how to connect my code to the server?