0

Does android GCM registationid changes? As I understood, It's not permanent. When internet connection is on it's send an onRegister signal. But what about when there is no internet connection?

Shobhit Puri
  • 25,769
  • 11
  • 95
  • 124
Hi Mans
  • 65
  • 2
  • 9

1 Answers1

0

The registration ID can change at any time which is why you need to implement GCMBaseIntentService and override onRegistered so that anytime a new registration ID is sent to you, you can get it.

If there is no internet then obviously you wont be able to get the new ID

tyczj
  • 71,600
  • 54
  • 194
  • 296
  • For sending notification Google tries again few times if there is no internet. Does the same happen in this case for renewing the registrationID? I couldn't find any doc which mentions the case of internet unavailability case for renewing the ID. Can you plese point to the same ? – Shobhit Puri Aug 14 '13 at 17:16
  • I dont know I have never actually waited for it to happen since it does not happen that much – tyczj Aug 14 '13 at 17:26
  • 1
    You're right it doesn't happen frequently. I read on http://stackoverflow.com/questions/16838654/handling-registration-id-changes-in-google-cloud-messaging-on-android/16839326 thread in comments that for someone it happened in few hours of obtaining the an ID. – Shobhit Puri Aug 14 '13 at 17:30