Can we register for FID and token both in firebase cloud messaging? #10212
livefielddev
started this conversation in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
FID becomes unregistered after requesting a registration token
Description
I'm migrating my Firebase Cloud Messaging implementation from a registration token based approach to the newer Firebase Installation ID (FID) based approach.
For device-specific messaging, sending notifications to the FID works as expected.
However, my application also uses FCM Topics. Currently, topic subscription APIs require a registration token, as there doesn't appear to be a way to subscribe an FID directly to a topic.
Steps
getToken()to obtain an FCM registration token so the device can subscribe to topics.Expected behavior
Requesting an FCM registration token for topic subscriptions should not invalidate or unregister the existing FID. The same installation should continue to receive device-specific messages while also being able to use topic subscriptions.
Actual behavior
After calling
getToken(), sending a message to the previously working FID returns aNotRegisterederror. Messages to the registration token continue to work.Question
Is this expected behavior?
If so, what is the recommended approach for applications that need both:
Is there a supported migration path for applications that want to adopt FID-based messaging while continuing to use FCM Topics?
All reactions