ltvie ltvie - 2 years ago 278
Android Question

will Token FCM change periodic like GCM regID?

I have published apps in playstore that use GCM and I have a plan to migrate using FCM. everything information i needed have found, but i have one question that not find answer yet. my question is when token have been created, are token will be change periodically like GCM does?


Answer Source

Similarly to how GCM works, the FCM token can change due to token-rotation.

You can intercept the token rotation implementing the callback: FirebaseInstanceId.onTokenRefresh()

Note: the token rotation is a rare-event. Don't expect to see it often.
But still, if you care about the token you should implement onTokenRefresh() to be informed of changes.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download