onNewToken

open override fun onNewToken(token: String)

Called when a new FCM token is generated.

This method is invoked by Firebase when a new device token is generated, typically when the app is installed, updated, or when the token is refreshed by Firebase. The new token is forwarded to the PushFeature module for registration and management.

The token refresh process includes:

  • Logging the token refresh event
  • Forwarding the token to PushFeature module
  • Updating internal token state
  • Notifying registered listeners

Parameters

token

The new FCM token. Must not be null.

See also

#tokenRefresh(Context, String?)