I am updating my apps to the latest android OS and am having difficulty with implementing Firebase messaging using the latest Android API. I have searched the forum and had not found anything discussing this issue. I may have missed a previous discussion. Sorry if this has already been discussed.
The issue is that the Firebase messaging service will crash if the app is not foreground or isn't in the "recent" list. The Firebase messaging works fine running under pre-Oreo even when the app is not foreground and not in the "recent" list.
I believe that it may be related to the recent os changes described here: https://developer.android.com/about/versions/oreo/background.html.
Crash report:
Exception java.lang.IllegalStateException: Not allowed to start service Intent { act=b4a_firebasemessaging cmp=com.scsoftstudios.edacec/.firebasemessaging (has extras) }: app is in background uid UidRecord{d6ef069 u0a304 RCVR idle change:uncached procs:1 seq(0,0,0)}
android.app.ContextImpl.startServiceCommon (ContextImpl.java:1521)
android.app.ContextImpl.startService (ContextImpl.java:1477)
android.content.ContextWrapper.startService (ContextWrapper.java:650)
anywheresoftware.b4a.objects.FirebaseNotificationsService.onMessageReceived (FirebaseNotificationsService.java:54)
com.google.firebase.messaging.FirebaseMessagingService.handleIntent ()
com.google.firebase.iid.zzg.run ()
java.util.concurrent.ThreadPoolExecutor.runWorker (ThreadPoolExecutor.java:1162)
java.util.concurrent.ThreadPoolExecutor$Worker.run (ThreadPoolExecutor.java:636)
java.lang.Thread.run (Thread.java:764)
Has anybody discovered a workaround for this issue where Firebase messaging works properly with Oreo devices whether the app is not in the foreground nor in the "recent" list?
Thank you for your help.
John
The issue is that the Firebase messaging service will crash if the app is not foreground or isn't in the "recent" list. The Firebase messaging works fine running under pre-Oreo even when the app is not foreground and not in the "recent" list.
I believe that it may be related to the recent os changes described here: https://developer.android.com/about/versions/oreo/background.html.
Crash report:
Exception java.lang.IllegalStateException: Not allowed to start service Intent { act=b4a_firebasemessaging cmp=com.scsoftstudios.edacec/.firebasemessaging (has extras) }: app is in background uid UidRecord{d6ef069 u0a304 RCVR idle change:uncached procs:1 seq(0,0,0)}
android.app.ContextImpl.startServiceCommon (ContextImpl.java:1521)
android.app.ContextImpl.startService (ContextImpl.java:1477)
android.content.ContextWrapper.startService (ContextWrapper.java:650)
anywheresoftware.b4a.objects.FirebaseNotificationsService.onMessageReceived (FirebaseNotificationsService.java:54)
com.google.firebase.messaging.FirebaseMessagingService.handleIntent ()
com.google.firebase.iid.zzg.run ()
java.util.concurrent.ThreadPoolExecutor.runWorker (ThreadPoolExecutor.java:1162)
java.util.concurrent.ThreadPoolExecutor$Worker.run (ThreadPoolExecutor.java:636)
java.lang.Thread.run (Thread.java:764)
Has anybody discovered a workaround for this issue where Firebase messaging works properly with Oreo devices whether the app is not in the foreground nor in the "recent" list?
Thank you for your help.
John