我在Playstore上发布了使用GCM的应用程序,我有一个使用FCM进行迁移的计划。我需要的一切信息都已找到,但是我有一个问题没有找到答案。我的问题是什么时候创建了令牌,令牌会像GCM那样周期性地发生变化?
谢谢
解决方案与GCM的工作方式类似,FCM令牌可能因令牌轮换而发生更改。
您可以截取执行回调: FirebaseInstanceId.onTokenRefresh()
firebase.google/docs/cloud-messaging/android/client#sample-register
注意:令牌轮换是一种罕见事件。不要指望经常看到它。 但是,如果你关心的是令牌,你应该实现 onTokenRefresh()来通知变化。
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?
thanks
解决方案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()
firebase.google/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.
更多推荐
FCM令牌是否会像GCM注册ID一样定期更改?
发布评论