I'm building an Android app and managed to set up Firebase Instance Messaging in my app. Howerver, I realize that when I open my app again after 5-6 days without open it, the token renewed/refreshed. And I pretty sure I didn't do any of following (based on FCM documentation):
*The app is restored on a new device.
*The user uninstalls/reinstall the app.
*The user clears app data.
But I'm not sure how is this really being done (by the app itself):
*The app deletes Instance ID.
Anyway, is that the new registration token is refreshed only after the app is relaunch (i.e. launched after 5-6 days like my case)?
Would the old token is still workable in receive push notification / instance cloud messaging before the app relaunch (i.e. trigger the onTokenRefresh() ) ?
Or is it the onTokenRefresh() could be even silently running at the background?
So, I'm wondering how those expert chatting apps cater for this kind of scenario? Thanks.