no, i have samsung phone.
Now... when i make ExitApplication (from activity where i read Push message), the application return on the same page and not close (Only in release mode)
my code push is this:
Sub Process_Globals
Private const API_KEY As String = "my_key"
End Sub
Sub AppStart (Args() As String)
SendMessage("general", "Benvenuto2", "Hello2!!!!")
StartMessageLoop
End Sub
Private Sub SendMessage(Topic As String, Title As String, Body As String)
Dim Job As HttpJob
Job.Initialize("fcm", Me)
Dim m As Map = CreateMap("to": $"/topics/${Topic}"$)
Dim data As Map = CreateMap("title": Title, "body": Body,"id_notifica":"120") // 120 is my id
m.Put("data": data)
Dim jg As JSONGenerator
jg.Initialize(m)
Job.PostString("
https://fcm.googleapis.com/fcm/send", jg.ToString)
Job.GetRequest.SetContentType("application/json")
Job.GetRequest.SetHeader("Authorization", "key=" & API_KEY)
End Sub
Private Sub SendMessageToSingleDevice(Devtoken As String, datastring As String)
Dim Job As HttpJob
Job.Initialize("SendMessage", Me)
Dim m As Map = CreateMap("to": $"${Devtoken}"$)
Dim noti As Map = CreateMap("body":"Notification ", "title":"New message!")
Dim data As Map = CreateMap("data": datastring)
m.Put("notification", noti)
m.Put("data", data)
m.Put("content_available": True)
Dim jg As JSONGenerator
jg.Initialize(m)
Job.Tag=jg
Log(jg.ToString)
Job.PostString("
https://fcm.googleapis.com/fcm/send", jg.ToString)
Job.GetRequest.SetContentType("application/json;charset=UTF-8")
Job.GetRequest.SetHeader("Authorization", "key=" & API_KEY)
End Sub
Sub JobDone(job As HttpJob)
Log(job)
If job.Success Then
Log(job.GetString)
End If
job.Release
StopMessageLoop '<-- non ui app only
End Sub