sub Process_Globals
Private fm As FirebaseMessaging
Dim NotifSound As SoundPool
Dim NotifID As Int
End Sub
Sub Service_Create
fm.Initialize("fm")
NotifSound.Initialize(2)
NotifID = NotifSound.Load(File.DirAssets, "notification.ogg")
End Sub
Sub fm_MessageArrived (Message As RemoteMessage)
Dim n As Notification
n.Initialize
n.Icon = "notification"
n.Sound = False
n.Vibrate = False
n.Light = False
n.OnGoingEvent = False
n.AutoCancel = True
n.SetInfo(Message.GetData.Get("title"), Message.GetData.Get("body"), Message.GetData.Get("activity"))
n.Notify(1)
NotifSound.Play(NotifID, 1, 1, 1, 0, 1)
end sub