Hello,
I have updated to b4a 12.2 to change firebasenotifications service to receivers. It looks to work without problem. Only problem is, when the app is on background and notification received, even if I click on the notification to launch the app, app icon and notification stays on notification panel. It sohuld be removed after read. Am I handling something wrong?
this is my receivers messagearrived sub:
I have updated to b4a 12.2 to change firebasenotifications service to receivers. It looks to work without problem. Only problem is, when the app is on background and notification received, even if I click on the notification to launch the app, app icon and notification stays on notification panel. It sohuld be removed after read. Am I handling something wrong?
this is my receivers messagearrived sub:
B4X:
Sub fm_MessageArrived (Message As RemoteMessage)
Log("Message arrived")
Log($"Message data: ${Message.GetData}"$)
Dim n2 As Notification
n2.Initialize2(n2.IMPORTANCE_DEFAULT)
n2.Icon = "icon"
n2.SetInfo2(Message.GetData.Get("title"), Message.GetData.Get("body"),Message.GetData.Get("ilgili"), Main)
n2.Notify(1)
Main.notitite=Message.GetData.Get("title")
Main.notitext=Message.GetData.Get("body")
If Main.isactive Then
LogColor("acikken geldi",Colors.Yellow)
CallSub(Main, "notiac")
End If
End Sub