ShiIsMe
Member
hi I send a push notif usig php to firebase using API(V1)
but i got only logs and not working Fm_MessafeArrive
here's the log
*** Service (starter) Create ***
** Service (starter) Start **
** Activity (main) Create (first time) **
** Activity (main) Resume **
*** Service (firebasemessaging) Create ***
** Service (firebasemessaging) Start **
TokenRefresh: coZs_fUYSPKday-_hTGnr2:APA91bFRtW0w8-ROms5jSo1wWpeO1FIIwbrG3PgBhHBalZjkl5bWBHVfQBjKr8AxKRvQlXT-0P1P0CthLfLDRtMHbhUs17wGTLHJjq88zYjspmCF90KVLWTnwaiXpvdUhYYzm7s4Mc-y
** Receiver (firebasemessaging) OnReceive **
** Service (firebasemessaging) Start **
Here the codee
#Region Service Attributes
#StartAtBoot: False
#End Region
Sub Process_Globals
Private fm As FirebaseMessaging
End Sub
Private Sub Receiver_Receive (FirstTime As Boolean, StartingIntent As Intent)
If FirstTime Then
fm.Initialize("fm")
End If
Log("activated")
fm.HandleIntent(StartingIntent)
End Sub
Public Sub SubscribeToTopics
fm.Initialize("fm")
fm.SubscribeToTopic("general")
End Sub
Sub fm_MessageArrived (Message As RemoteMessage)
Log("Message arrived")
Log($"Message data: ${Message.GetData}"$)
Dim n2 As Notification
n2.Initialize2(n2.IMPORTANCE_DEFAULT)
n2.Icon = "icon"
n2.SetInfo(Message.GetData.Get("title"), Message.GetData.Get("body"), Main)
n2.Notify(1)
End Sub
Sub fm_TokenRefresh (Token As String)
Log("TokenRefresh: " & Token)
End Sub
but i got only logs and not working Fm_MessafeArrive
here's the log
*** Service (starter) Create ***
** Service (starter) Start **
** Activity (main) Create (first time) **
** Activity (main) Resume **
*** Service (firebasemessaging) Create ***
** Service (firebasemessaging) Start **
TokenRefresh: coZs_fUYSPKday-_hTGnr2:APA91bFRtW0w8-ROms5jSo1wWpeO1FIIwbrG3PgBhHBalZjkl5bWBHVfQBjKr8AxKRvQlXT-0P1P0CthLfLDRtMHbhUs17wGTLHJjq88zYjspmCF90KVLWTnwaiXpvdUhYYzm7s4Mc-y
** Receiver (firebasemessaging) OnReceive **
** Service (firebasemessaging) Start **
Here the codee
#Region Service Attributes
#StartAtBoot: False
#End Region
Sub Process_Globals
Private fm As FirebaseMessaging
End Sub
Private Sub Receiver_Receive (FirstTime As Boolean, StartingIntent As Intent)
If FirstTime Then
fm.Initialize("fm")
End If
Log("activated")
fm.HandleIntent(StartingIntent)
End Sub
Public Sub SubscribeToTopics
fm.Initialize("fm")
fm.SubscribeToTopic("general")
End Sub
Sub fm_MessageArrived (Message As RemoteMessage)
Log("Message arrived")
Log($"Message data: ${Message.GetData}"$)
Dim n2 As Notification
n2.Initialize2(n2.IMPORTANCE_DEFAULT)
n2.Icon = "icon"
n2.SetInfo(Message.GetData.Get("title"), Message.GetData.Get("body"), Main)
n2.Notify(1)
End Sub
Sub fm_TokenRefresh (Token As String)
Log("TokenRefresh: " & Token)
End Sub