1
votes

I'm currently trying out GCM on android with the DemoActivity project that I downloaded from android SDK. There are a couples of question regarding this whole GCM stuff. Correct me if I'm wrong.

  1. Based on my understanding, what we needed to register the android device for GCM is just Sender_ID and Server_URL? Server_URL is based on the URL of my 3rd Party Application Server for example http://localhost:8080/gcm_test. As for Sender_ID is basically Google API's Project ID.

  2. Do I need to send the registration ID from the android device to the server side and store it in server side database or something like that?

  3. In order to send message from server to the android device, we needed API key and the android Registration ID?

  4. How to configure on the server side in order to send message?

1
This link answers all your questions - Abhay Kumar

1 Answers

1
votes

1)Right

2)Yes.You need that whenever you need to send a Push Notification to a particular device.The server identifies this device using a registeration id.

3)You need the Google App Id you got when you created the project and the registration Id you saved on the backed.

4)For ASP.NET look at this.

string GoogleAppID = "google application id";        
        var SENDER_ID = "9999999999";
//......
//......
    AndroidGCMPushNotification apnGCM = new AndroidGCMPushNotification();

string strResponse =
apnGCM.SendNotification(devRegId,
"Test Push Notification message ");