2

I want to know where the firebase fcm instance id token is stored on an android phone. I Already know how to generate a firebase token by using FirebaseInstanceId.getInstance().getToken() .

I want to know how and where does android stores this token on the device as every time i run this method, the token is same (Except when token is regenerated) . I have a rooted phone so i checked all the databases and preferences files of my app, but the token is not stored in any of those. Since the token is same every time, it must be stored in the phone somewhere. Does anyone knows where the token is stored

Thanks for reading, in advance .

EDIT

So I Tried killing and restarting the app and disconnected the internet. Now when i try to get the token, it is still there, so does it mean that it is still on the device?. still don't know the answer

Nick Asher
  • 726
  • 5
  • 19
  • 1
    You say _it is indeed null when we are not connected to internet_. Not on my phone. When I turn on airplane mode, kill and restart the app, I get the same non-null token as before. The token is stored on the device. – Bob Snyder Feb 24 '17 at 21:35
  • See [how to ask](http://stackoverflow.com/help/how-to-ask) and [creating an mcve](http://stackoverflow.com/help/mcve). – Kato Feb 24 '17 at 22:51

1 Answers1

-1

Token is not saved in our mobile . It is stored in Google fcm database. Whenever we use FirebaseInstanceId.getInstance().getToken() It is downloaded from the Google FCM database

Nick Asher
  • 726
  • 5
  • 19