android - FirebaseInstanceIdService on TokenRefresh -
i implemented push notifications on app couple of months ago. problem had change firebase cert on aws , there lot of push notification failures. due rollout update on monday.
i know in following cases:
- app deletes instance id
- app restored on new device
- user uninstalls/reinstall app
- user clears app data
firebaseinstanceidservice
gets fired , in turn ontokenrefresh()
gets called. question however, if user receives update application, service fired, update equivalent app restored on new device
?
this solve push failures if register token aws on receipt,
any info great
i don't think app update cause firebase create new token. can use code force firebase:
firebaseinstanceid.getinstance().deleteinstanceid(); firebaseinstanceid.getinstance().gettoken();
you can in main activity example, , save boolean in shared preferences once done don't refresh token on each launch.
Comments
Post a Comment