Zishan Neno
Zishan Neno

Reputation: 2817

Android C2DM Registration Id Validity

Ok, so I just took a dive into Android's C2DM service and it works great, or super fast I must say. Now that I'm starting to develop the web service that would handle client registration Ids on the server, could someone please tell me:

  1. How long is the registration Id valid for? Does it have an expiry?
  2. Should my app be calling for the C2DM service on each onCreate event of the main activity to get the registration Id or is it safe to store it somewhere and not worry that Google would change it?
  3. Is this registration Id the same for all the apps that consume C2DM service that are running on the device?

Any insight into the subject would be great help. Thanks a lot!

Upvotes: 1

Views: 305

Answers (1)

Karthik
Karthik

Reputation: 5033

I have done the C2DM using google C2DM services,its pretty much simple.Just follow this link. It has all the answers regarding the C2DM registration and related services.For your question 2 the answer is that you need to call the url only once during installation which gets registered in the google server after that when ever you send message from your server side,it will be delivered to the device on condition if it is ready to recieve message.For Question 3,you need to get registered all the apps seprately only since the folder you have the class for C2DM classes will get registered in the google.As a result of it the messages will be only delivered to the corresponding apps only.

Upvotes: 1

Related Questions