I have a question. I want to receive notifications on the phone but only if the app is closed. I work with firebase and everything works fine, but with the app open I keep receiving notifications. Thank you.
Sub fm_MessageArrived (Message As RemoteMessage)
For Each Act As Object In Array(Main)
If IsPaused(Act) = False Then Return
Next
Log("Message arrived")
Log($"Message data: ${Message.GetData}"$)
Dim n As Notification
n.Initialize
n.Icon = "icon"
n.SetInfo(Message.GetData.Get("title"), Message.GetData.Get("body"), Main)
n.Notify(1)
End Sub
It works well. but if I go out with the button back, reopening the app throws up an error.
I have to double-tap to open the app