0

I am interested in implementing C2DM for the push notification feature in my application. However, when I read the docs https://developers.google.com/android/c2dm/#lifecycle It states that: "Note that Google may periodically refresh the registration ID, so you should design your application with the understanding that the REGISTRATION Intent may be called multiple times. Your application needs to be able to respond accordingly"

How about if the case is the device has no connection when Google refresh the registration ID? Of course the REGISTRATION Intent will not be called. Does Google try to refresh again the registration ID? If not, how can the device know that the Google refresh the registration ID?

Thanks,

Rendy

Rendy
  • 5,572
  • 15
  • 52
  • 95

1 Answers1

0

Every message from Google's C2DM Server is put into a queue to be sent to the device. So, if the device is offline (not available), the server will repeatedly try to push it to the device. Although Google makes no guarantee of this, most of the times it works fine (you can try it yourself by sending a message to an offline device, and connecting it to the internet after a couple of hours. You should receive your message).

Same thing goes for the registration ID. If Google does not manage to send to the device the new registration ID, it will periodically try to send it until it succeeds. The question is now: until it succeeds, does the old registration ID still work? It should, but I sincerely have no guarantee for this.

Raul Rene
  • 10,014
  • 9
  • 53
  • 75