Similarly to how GCM works, the FCM token can change due to token-rotation . Note: the token rotation is a rare-event. Don’t expect to see it often. But still, if you care about the token you should implement onTokenRefresh() to be informed of changes.
Read moreHow often do firebase tokens change?
Every time the device token is changed , It is reflected in onTokenRefresh() method. For getting the device token when it is changed, we can call this method to get the refreshed token. and to get the device token at any time we can use FirebaseInstanceId. getInstance().
Read moreWhat are FCM tokens?
An FCM Token, or much commonly known as a registrationToken like in google-cloud-messaging. As described in the GCM FCM docs: An ID issued by the GCM connection servers to the client app that allows it to receive messages . Note that registration tokens must be kept secret.
Read moreHow long is FCM token valid?
It doesn’t expire though.1 Şub 2017
Read more