I'm looking at implementing messaging between mobile and browser apps using Firebase cloud messaging and i have a few questions, that the docs don't seem to answer.
For being able to receive messages, you need a Registration Token (RT).
Messages can be send to a RT, to a topic or to a device group notification_key
.The RT can also be used:
- directly
- to subscribe to a topic
- to add to a device group
The RT can also expire/change.
In my app, I'm maintaining a list of RT per user. Now, when the RT changes:
- Do I have to unsubscribe the old token and subscribe the new token to topics?
- Do I have to remove the old token and add the new token to device groups?
- Is it possible to get information about device groups/topics for a token?
- Can I add a token to a device group more than once?
- Can I subscribe a token to a topic more than once?
- Will multiple subscriptions/additions of the same token result in receiving duplicate messages
Sorry, that's a lot of questions, but I guess, for somebody who has gone through this, it should be pie ;)