iOS Question B4I Push Notification to Specific Device

George_G

Member
Licensed User
Hello everyone!

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?

Thank you in Advance.
 

tufanv

Expert
Licensed User
Longtime User
B4X:
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
 
Upvote 1

George_G

Member
Licensed User
Thanks a lot!
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…