Platform: Android.
Feature: Firebase Cloud messaging.
Behavior:
Whenever FirebaseInstanceId. getToken() method is called very first time, It retrieves a fcm token.
My app sends this token to the server.
After a few seconds, FirebaseMessagingService. onNewToken() method is called even though the token is not updated, it gives the same token.
I don't maintain a copy of token in App's local DB.
Hence whenever FirebaseMessagingService. onNewToken() method is called, App again sends token to the server even though it is actually not updated.
Please note that this behavior happens only first time FirebaseInstanceId. getToken() method is called.
Subsequent call of this method does not led to the invocation of FirebaseMessagingService. onNewToken() method.
FirebaseMessagingService. onNewToken() method is called even though token is not changed after calling FirebaseInstanceId. getToken() method first time.
Any one observed this behavior?
Does this behavior sound like a defect?