Let's poke the server every time the app is started, and every 7 days. (Every 7 days is in the best practices guide for FCM).
There's a bunch of logic in there now for caching the FCM token and deciding when to submit to the backend and when to remove from the backend--nope! Let's just poke the backend with the current token. The backend will drop ones more than 30 days old (that's what the FCM best practices guide says, anyway).
I put some time into this today. I have the code updated and removed, but it needs a little more testing before I'm OK saying this is done. (ready to put into a beta release, that is)
Let's poke the server every time the app is started, and every 7 days. (Every 7 days is in the best practices guide for FCM).
There's a bunch of logic in there now for caching the FCM token and deciding when to submit to the backend and when to remove from the backend--nope! Let's just poke the backend with the current token. The backend will drop ones more than 30 days old (that's what the FCM best practices guide says, anyway).
See: