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.
Do I need to uninstall the previous app version from Play Store and then install new version?
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:
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With