1

Do we need to handle the refreshing of registration ids by google even with the new registration process they introduced recently or there is no concept of refreshing ids with the new process. Thanks for your help!!!!!

Eran
  • 387,369
  • 54
  • 702
  • 768
user2525103
  • 41
  • 1
  • 7

1 Answers1

0

The concept seems to exist like this -Your app should refresh the registration ID by setting an expiration date on the value persisted locally by the app. When the app starts, it should load the locally stored registration id. If it is "expired", which means it was received from GCM over a week ago, then gcm.register(senderID) should be called again. This is how it happens with the demo app from Google that uses the new GCM interface.

But if a registration ID is refreshed by Google for an app that hasn't been launched for a long time, the app won't be see the change, nor will the 3rd party server.

Details and an update here

Community
  • 1
  • 1
Vrashabh Irde
  • 14,129
  • 6
  • 51
  • 103
  • Thanks for your reply. But what if Google decides to refresh the id in between the 7 days. Is there a way to handle this. – user2525103 Jun 30 '13 at 19:56
  • No comment on frequency in the docs, the 7 days is just from their demo app. 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`.So handle for `NotRegistered` error code and resend `gcm.register`. – Vrashabh Irde Jul 01 '13 at 02:36
  • @Slartibarfast. Should we handle this on the server side or on the client side. IF on the client side how to do(since GCMBaseIntentService is deprecated is there any other API similar) and if on the server how to notify the client. – user2525103 Jul 01 '13 at 14:23