supermonkey
supermonkey

Reputation: 655

RegistrationId with GCM after upgrade of app in Android

In Android App, I get registrationId for sending push notification with GCM by the following code.

registrationId = gcm.register("xxxxx");

According to several websites, when the app is upgraded, registrationId is changed.

It may be so, however after upgrade, I can send push notification by registrationId of the previous version.

So I think there is no need to reacquire registrationId after upgrade.

Why should I reacquire RegistrationId despite to send push notification by previous registrationId?

Upvotes: 0

Views: 82

Answers (1)

Arthur Thompson
Arthur Thompson

Reputation: 9225

Note: It seems like you are not using the recommended way of retrieving identifiers, InstanceID tokens. Have a look at this sample for example of the recommended usage.

More to your question, from the documentation:

Instance ID is stable but may become invalid, if:

  • App deletes Instance ID
  • Device is factory reset
  • User uninstalls the app
  • User clears app data

Given the above application updates should not cause invalidation of tokens.

Upvotes: 0

Related Questions