Will FCM Token change periodically like GCM registration ID?

后端 未结 1 1563
不知归路
不知归路 2020-12-30 04:54

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 ans

相关标签:
1条回答
  • 2020-12-30 05:41

    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()

    https://firebase.google.com/docs/cloud-messaging/android/client#sample-register

    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.

    0 讨论(0)
提交回复
热议问题