So I am having a hard time figuring out when the InstanceID is created any why it isn't working upon the first time it is opened.
When I run the app for the first time, this code returns null.
FirebaseInstanceId.getInstance().getToken();
I even tried a while loop and just waited till it returned something but no luck.
BUT when I close the app and open it again, I then get the InstanceID. Any clue why? I'm trying to obtain it on the splash screen of the app.
onTokenRefresh is not being called untill the restart. I can see some work arounds... but prefer to just get it off the bat.
Thanks!