I am trying to send a notification (I am using firebase push notification), to a specific IOS device.
In B4A I used "fm.Token", but this is not in B4I.
Any idea?
Private Sub fm_FCMConnected
Log("FCMConnected")
Log(GetToken)
End Sub
B4X:
Private Sub GetToken As String
Dim no As NativeObject
Dim token As NativeObject = no.Initialize("FIRInstanceID").RunMethod("instanceID", Null).RunMethod("token", Null)
If token.IsInitialized Then Return token.AsString Else Return ""
End Sub
Private Sub fm_FCMConnected
Log("FCMConnected")
Log(GetToken)
End Sub
B4X:
Private Sub GetToken As String
Dim no As NativeObject
Dim token As NativeObject = no.Initialize("FIRInstanceID").RunMethod("instanceID", Null).RunMethod("token", Null)
If token.IsInitialized Then Return token.AsString Else Return ""
End Sub