'How to handle multiple Firebase cloud messaging tokens?
I am sending a firebase cloud message to multiple android and ios app users.
My implementation works however I would like clarity regarding how exactly firebase cloud messaging tokens work?
Am I correct in understanding that I need to keep a table of all my app users individual firebase tokens in some fashion? And then pass each of those tokens to my webserver's method that generates and sends the automatic firebase notification message?
Solution 1:[1]
If you send messages to registration tokens and want to target specific users of your app, it is indeed common to keep a mapping of registration tokens to users in a database.
This typically involves both adding the tokens when you detect them in the client-side application, and removing outdated tokens when you detect that condition on the server.
For a full overview, have a look at the Firebase documentation on token management.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Frank van Puffelen |
