Sub MessageArrived (Intent As Intent)
Dim From, CollapseKey, Data As String 'ignore
If Intent.HasExtra("from") Then From = Intent.GetExtra("from")
If Intent.HasExtra("data") Then Data = Intent.GetExtra("data")
If Intent.HasExtra("collapse_key") Then CollapseKey = Intent.GetExtra("collapse_key")
Log(Intent.ExtrasToString)
'Here you should handle the new message:
Log("New message arrived: " & Data)
ToastMessageShow("New message: " & Data, True)
Dim n As Notification
n.Initialize
n.Icon = "icon"
n.Sound = True
n.SetInfo(Data, Data, Main)
n.Notify(1)
End Sub