onTokenRefresh not getting called in signed APK, if previous version of app installed doesn#39;t have FCM implemented(onTokenRefresh 不会在签名的 APK 中被调用,如果之前安装的应用版本没有实现 FCM)
问题描述
我在我的 Android 应用程序版本 6 中实现了 FCM.onTokenRefresh()
如果以前没有安装我的应用程序,则会被调用.但是,当我的应用程序具有以前的版本(没有实现 FCM)并且我用版本 6 更新它时,onTokenRefresh()
没有被调用.
I have implemented FCM in version 6 of my Android application. onTokenRefresh()
is getting called if my app is not previously installed. But when my app with a previous version (which did not have FCM implemeted) is already installed and I update it with version 6, then the onTokenRefresh()
is not getting called.
我需要从 Play 商店卸载之前的应用版本,然后再安装新版本吗?
Do I need to uninstall the previous app version from Play Store and then install new version?
推荐答案
我认为这仍然应该是预期的行为.onTokenRefresh()
将在 第一次 应用安装时调用.不是每次都更新.所以也许,您可以手动强制 onTokenRefresh()
就像这篇 post 中提到的那样:
I think that should still be the intended behavior. onTokenRefresh()
will be called the first time the app is installed. Not every time it's updated. So maybe, you could manually force the onTokenRefresh()
like what is mentioned in this post:
如果您想手动强制 onTokenRefresh()
,您可以创建一个 IntentService 并删除令牌实例.然后,当你调用getToken时,onTokenRefresh()
方法会再次被调用.
If you would like to manually force the
onTokenRefresh()
, you can create an IntentService and delete the token instance. Then, when you call getToken, theonTokenRefresh()
method will be called again.
这篇关于onTokenRefresh 不会在签名的 APK 中被调用,如果之前安装的应用版本没有实现 FCM的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:onTokenRefresh 不会在签名的 APK 中被调用,如果之前安装的应用版本没有实现 FCM


- Xcode 7.3 中带有 UILabel 的 UIStackView 2022-01-01
- 在 Iphone SDK 的导航栏上添加多个按钮 2022-01-01
- 如何在 iPhone 模拟器中重置 NSUserDefaults 数据? 2022-01-01
- 类似于 Mail.app 的 iPad 模态视图控制器? 2022-01-01
- URL编码Swift iOS 2022-01-01
- 使用自动布局向 UIScrollView 添加动态大小的视图 2022-01-01
- 网上有没有好的 UIScrollView 教程? 2022-01-01
- GPS状态的广播接收器? 2022-01-01
- UITextView 内容插图 2022-01-01
- SetOnItemSelectedListener上的微调程序错误 2022-01-01