hi
how can i send from my B4A app a push notification?
i try this:
but Job.GetRequest doesnot have a "SetContentType" or "SetHeader" option
only in b4j it has
(ps: the lib i am using is okHttpUtiils)
thanx ilan
how can i send from my B4A app a push notification?
i try this:
B4X:
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)
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;charset=UTF-8")
Job.GetRequest.SetHeader("Authorization", "key=" & API_KEY)
End Sub
but Job.GetRequest doesnot have a "SetContentType" or "SetHeader" option
only in b4j it has
(ps: the lib i am using is okHttpUtiils)
thanx ilan