Hello,
I am getting this error for a while. I don't have any "startserviceat" or similar. My questions:
1) Should I change starter service to reciever?
2) In my firebase messaging receiver, only sub that can trigger background start is fm_messagearrived sub. Mine is :
What can cause the foregroundServiceStartNotAllowed Exception here? callsub to a main? Or the error is coming from somewhere else?
My starter service has:
this can cause it?
I am getting this error for a while. I don't have any "startserviceat" or similar. My questions:
1) Should I change starter service to reciever?
2) In my firebase messaging receiver, only sub that can trigger background start is fm_messagearrived sub. Mine is :
B4X:
Sub fm_MessageArrived (Message As RemoteMessage)
Log("Message arrived")
Log($"Message data: ${Message.GetData}"$)
Dim n2 As Notification
n2.Initialize2(n2.IMPORTANCE_HIGH)
n2.Icon = "icon"
n2.Sound=True
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
CallSub(Main, "notiac")
End If
End Sub
What can cause the foregroundServiceStartNotAllowed Exception here? callsub to a main? Or the error is coming from somewhere else?
My starter service has:
B4X:
Sub Service_Start (StartingIntent As Intent)
Service.StopAutomaticForeground 'remove if not using B4A v8+.
End Sub
this can cause it?