Firebase onTokenRefresh() is not called

后端 未结 13 2137
天命终不由人
天命终不由人 2020-11-27 16:59

In my MainActivityin my log, I can see the token using FirebaseInstanceId.getInstance().getToken() and it display the generated token. But it seem

13条回答
  •  再見小時候
    2020-11-27 17:28

    I have experienced that MyFirebaseInstanceIDService is not called when you are running your application on a device where internet connectivity is not available. In this way onTokenRefresh() is not called. So make sure that your device must has internet connection during running your application for taking updated FirebaseToken.

    Also uninstall the previous app & Re-Install it for taking updated token. The registration token change when:

    1) The app deletes Instance ID

    2) The app is restored on a new device

    3) The user uninstalls/reinstall the app

    4) The user clears app data.

提交回复
热议问题