Skip to content

MyFirebaseMessagingService.onNewToken() is never called #1

@i--storm

Description

@i--storm

According to FCM documentation:
"On initial startup of your app, the FCM SDK generates a registration token for the client app instance. If you want to target single devices or create device groups, you'll need to access this token by extending FirebaseMessagingService and overriding onNewToken."
You will not receive token in onNewToken inside MyFirebaseMessagingService if in already generated for your app.
Routine inside MainActivity should be implemented to get current token
https://firebase.google.com/docs/cloud-messaging/android/first-message#retrieve-the-current-registration-token

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions