5

FirebaseInstanceIdService.class clearly states that onTokenRefresh() will be called when:

  • App deletes Instance ID
  • App is restored on a new device
  • User uninstalls/reinstall the app
  • User clears app data

When and under what circumstances will an app deletes an instance ID? Is there a possibility of it happening while an app is still active (ongoing activity or service)?

Hendra Anggrian
  • 5,780
  • 13
  • 57
  • 97

1 Answers1

3

The app deletes the Instance ID when you call FirebaseInstanceId.deleteInstanceId() in app:

Resets Instance ID and revokes all tokens.

And yes, you can call this method while your app is active.

AL.
  • 36,815
  • 10
  • 142
  • 281