Sub fm_MessageArrived (Message As RemoteMessage)
If(Message.GetData.Get("title") = Null) Then 'in app
Dim objMap As Map
objMap.Initialize
objMap.Put("d_title", Message.GetData.Get("d_title"))
objMap.Put("d_body", Message.GetData.Get("d_body")) 'also message body
objMap.Put("d_threadId", Message.GetData.Get("d_threadId"))
objMap.Put("d_newsId", Message.GetData.Get("d_newsId"))
CallSub2(Main, "inAppAction", objMap)
Else
Dim n As Notification
Dim myTitle As String = Message.GetData.Get("title")
myTitle=myTitle.ToLowerCase()
If(myTitle.contains("message")) Then
n.Initialize
n.Icon = "icon"
n.SetInfo2(myTitle, Message.GetData.Get("body"), "", Main)
n.AutoCancel = True
n.Notify(888)
End If
End If
End Sub