Sub fm_MessageArrived (Message As RemoteMessage)
Log("Message arrived")
Log($"Message data: ${Message.GetData}"$)
Dim n As NB6
n.Initialize("default", Application.LabelName, "DEFAULT").AutoCancel(True).SmallIcon(iconoNotificacion)
n.ShowWhen(DateTime.Now)
n.Build(Message.GetData.Get("title"), Message.GetData.Get("body"), "tag1", Main).Notify(4) 'It will be Main (or any other activity) instead of Me if called from a service.
Service.StopAutomaticForeground 'remove if not using B4A v8+.
End Sub