Hi all,
in the past I sucessfully used FCM for messages destined to group of users (i.e. topics). Today I'm experimenting with messages intended for a single user (i.e. token).
What I'm experiencing is that the token seems to become available only on a second launch of the application (or anyway not soon after the app is started).
Once the token becomes available, it suffice to disinstall the app and then istall it again to go back to square one where no token is available.
My code (in FirebaseMessaging service) is as follows:
Should I introduce a wait for fm.Isinitialized in service start, rely on some event (not TokenRefresh, since it doesn't raise at this time) or simply buy a new phone (mine is Android 4.4)?
Any other idea? TIA
in the past I sucessfully used FCM for messages destined to group of users (i.e. topics). Today I'm experimenting with messages intended for a single user (i.e. token).
What I'm experiencing is that the token seems to become available only on a second launch of the application (or anyway not soon after the app is started).
Once the token becomes available, it suffice to disinstall the app and then istall it again to go back to square one where no token is available.
My code (in FirebaseMessaging service) is as follows:
B4X:
Sub Service_Create
fm.Initialize("fm")
Log("Token: "&fm.Token)
end sub
Any other idea? TIA