I’ve been struggling with issues related to FCM tokens for a while, and I would really appreciate it if someone could explain how it works.
The Firebase token tells the notification server which device it corresponds to and where to send the notification. This token can change over time, so it’s necessary to inform the server in a timely manner that the device has a new token. I handle this by updating the token every 7 days during each app startup. But how does this work if the user doesn’t open the app for more than a week, and the app is completely terminated? I believe that a BackgroundTask could be used for this purpose, but from what I understand, it doesn’t work if the app is completely shut down (not just running in the background).
Would the user simply stop receiving notifications if the FCM token changes and they don’t open the app for a longer period? How is this typically handled in practice? Thanks.
Andy550 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.