Sub fm_MessageArrived (Message As RemoteMessage)
Service_Create
Log("Message arrived")
Log($"Message data: ID ${Message.MessageId}, Data ${Message.GetData}"$)
Log("Message="& Message)
Dim map As Map :map.Initialize
map = CreateMap("body2":Message.GetData.Get("body"),"title1":Message.GetData.Get("title"))
For Each key As String In map.Keys
Dim value As String = map.Get(key)
Next
Log($"${key}:${value}"$)
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