iOS Question Firebase Messaging: invalid registration Token

F.Campanella

Member
Licensed User
Hi,
I've send push notifications with firebase. it's work fine with topics but to single device send fail with "invalid registration token" message.

The token is correctly generated to device and registered in my server.
When I compile the message I pass in the field "to" this but firebase send error.

I've tried to send message at this device token in the firebase console too but I've received same error.

Can you help me?!?
 

F.Campanella

Member
Licensed User
Solved, i don't understand that I must use this code for get token

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
and not Application_PushToken

In the iOS tutorial is not clearly this.
 
Top