0

I am just started to learn the GCM in android. I did not find this in the documentation that Does Google keep the GCM Registration ID always?.

Can a developer remove it, any way to access this database programmatically?

android
  • 3,261
  • 3
  • 16
  • 18

1 Answers1

0

Besides the periodic refresh(which is rare),

An existing registration ID may cease to be valid in a number of scenarios, including: If the application manually unregisters by issuing a com.google.android.c2dm.intent.UNREGISTER intent. If the application is automatically unregistered, which can happen (but is not guaranteed) if the user uninstalls the application. If the registration ID expires. Google might decide to refresh registration IDs. For all these cases, you should remove this registration ID from the 3rd-party server and stop using it to send messages. Happens when error code is NotRegistered.

About the periodic refresh:

Note that Google may periodically refresh the registration ID, so you should design your Android application with the understanding that the com.google.android.c2dm.intent.REGISTRATION intent may be called multiple times

Read more:
http://developer.android.com/google/gcm/gcm.html
http://developer.android.com/google/gcm/adv.html#reg-state
Do GCM registration id's expire?

Community
  • 1
  • 1
Pararth
  • 8,114
  • 4
  • 34
  • 51
  • For all these cases, you should remove this registration ID from the 3rd-party server and stop using it to send messages. How can I get these from my 3rd party server? – android Feb 19 '14 at 15:41
  • get what from the 3rd party server? Reg Id? 3rd party server has what you sent to it from your application – Pararth Feb 19 '14 at 15:46
  • and no, for all those cases, there is no "should" remove registration ID from 3rd party server... what are you saying/asking ? please explain a bit more – Pararth Feb 19 '14 at 15:48
  • How do I know that Google has refreshed the ids and I then should delete it from my database? – android Feb 19 '14 at 15:49
  • Please check the second link in the answer..reg-state Also, http://developer.android.com/google/gcm/client.html – Pararth Feb 19 '14 at 15:59