Hello
If I send more than one message with b4j to b4a in format (Data), is it normal that the notification is not queued but overwritten?
-------> b4j
-------> b4a
If I send more than one message with b4j to b4a in format (Data), is it normal that the notification is not queued but overwritten?
-------> b4j
B4X:
Sub SendMessage(Topic As String, Title As String, Body As String)
-----
------
------
Dim data As Map = CreateMap("title": Title, "body": Body)
m.Put("data":data)
-------> b4a
B4X:
Sub fm_MessageArrived (Message As RemoteMessage)
Log("Message arrived")
Log($"Message data: ID ${Message.MessageId}, Data ${Message.GetData}"$)
Log("Message="& Message)
Dim map As Map :map.Initialize
map = CreateMap("title1":"","body1":Message.GetData)
Log("map="&map)
Dim jgen As JSONGenerator
jgen.Initialize(map)
Dim n As NB6
mano = LoadBitmapResize(File.DirAssets, "mano.png", 24dip, 24dip, False)
n.Initialize("default", Application.LabelName, "DEFAULT").AutoCancel(True).SmallIcon(mano)
n.Build(Message.GetData.Get("title"), Message.GetData.Get("body"), jgen.ToString, Main).Notify(4)
End Sub