Search code examples
androidfirebasefirebase-cloud-messagingfirebase-notifications

Android - According to what Firebase refreshing token


Maybe it is not important but I dont understood that when onTokenRefresh() function running.. Thank you

Edit : I m using FCM Notification on my Android project. My app send message to specific users with "registration token id"(I'm storing this). I worried about that when token id will change or is it literal values?


Solution

  • From the Firebase documentation:

    Because the token could be rotated after initial startup, you are strongly recommended to retrieve the latest updated registration token.

    The registration token may change when:

    • The app deletes Instance ID
    • The app is restored on a new device
    • The user uninstalls/reinstall the app
    • The user clears app data.