for HMS server needs tokens to push message to phones, so i need to get token ,but i can't get it by this code.
I think there may has a bug in the HMS lib
B4X:
Sub Class_Globals
Private hms As HMSManager
End Sub
Private Sub B4XPage_Created (Root1 As B4XView)
hms.Initialize
hms.EnableLogs
Root = Root1
Root.LoadLayout("MainPage")
Wait For (GetToken) Complete (Token As String)
log(token)
End Sub
Public Sub GetToken As ResumableSub
For i = 1 To 5
Wait For (hms.GetPushToken("104***63")) complete(Token As String)
If Token <> "" Then Return Token
Sleep(500)
Next
Return ""
End Sub
I think there may has a bug in the HMS lib
Last edited: