问题描述
我在 Playstore 中发布了使用 GCM 的应用,并且我计划使用 FCM 进行迁移.我需要的所有信息都已找到,但我有一个问题尚未找到答案.我的问题是创建令牌后,令牌会像 GCM 那样定期更改吗?
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?
谢谢
推荐答案
与 GCM 的工作原理类似,FCM 令牌可以因令牌轮换而改变.
Similarly to how GCM works, the FCM token can change due to token-rotation.
您可以拦截实现回调的令牌轮换:FirebaseInstanceId.onTokenRefresh()
You can intercept the token rotation implementing the callback: FirebaseInstanceId.onTokenRefresh()
https://firebase.google.com/docs/cloud-messaging/android/client#sample-register
注意:令牌轮换是一种罕见的事件.不要期望经常看到它.
但是,如果您关心令牌,您应该实现 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.
这篇关于FCM Token 会像 GCM 注册 ID 一样定期变化吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!


大气响应式网络建站服务公司织梦模板
高端大气html5设计公司网站源码
织梦dede网页模板下载素材销售下载站平台(带会员中心带筛选)
财税代理公司注册代理记账网站织梦模板(带手机端)
成人高考自考在职研究生教育机构网站源码(带手机端)
高端HTML5响应式企业集团通用类网站织梦模板(自适应手机端)