Background start not allowed #5466
Unanswered
dariomalfatti-centropaghe
asked this question in
Q&A
Replies: 2 comments 1 reply
-
Have you specified the priority as "high" when testing in debug as well? If not and it still worked somehow, that's weird because I had to specify the priority for background push notifications to work in debug. So, is the problem caused by the fact that setting the priority to high doesn't seem to work in production or simply that you didn't specify it at all (even in debug)? |
Beta Was this translation helpful? Give feedback.
1 reply
-
I wonder - https://dontkillmyapp.com/ |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I'm using a push notification to wake up from background my RN voip app when it receive a call.
In debug mode it works well but in production.
This is the logcat when the app receive the push.
I don't understand if the problem is because the message seems not to be set as high priority or because the background start is not allowed.
To configure the android environment, I followed the official guide here https://rnfirebase.io/
Any advise?
2021-07-01 09:56:21.335 16096-16096/? D/RNFirebaseMsgReceiver: broadcast received for message 2021-07-01 09:56:21.340 2052-5439/? W/ActivityManager: Background start not allowed: service Intent { cmp=com.centropaghe.viavoip/io.invertase.firebase.messaging.ReactNativeFirebaseMessagingHeadlessService (has extras) } to com.centropaghe.viavoip/io.invertase.firebase.messaging.ReactNativeFirebaseMessagingHeadlessService from pid=16096 uid=10224 pkg=com.centropaghe.viavoip startFg?=false 2021-07-01 09:56:21.343 16096-16096/? E/RNFirebaseMsgReceiver: Background messages only work if the message priority is set to 'high' java.lang.IllegalStateException: Not allowed to start service Intent { cmp=com.centropaghe.viavoip/io.invertase.firebase.messaging.ReactNativeFirebaseMessagingHeadlessService (has extras) }: app is in background uid UidRecord{fe2a7ad u0a224 RCVR bg:+2m39s441ms idle change:uncached procs:1 seq(0,0,0)} at android.app.ContextImpl.startServiceCommon(ContextImpl.java:1578) at android.app.ContextImpl.startService(ContextImpl.java:1533) at android.content.ContextWrapper.startService(ContextWrapper.java:664) at android.content.ContextWrapper.startService(ContextWrapper.java:664) at io.invertase.firebase.messaging.ReactNativeFirebaseMessagingReceiver.onReceive(ReactNativeFirebaseMessagingReceiver.java:54) at android.app.ActivityThread.handleReceiver(ActivityThread.java:3410) at android.app.ActivityThread.access$1300(ActivityThread.java:206) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1689) at android.os.Handler.dispatchMessage(Handler.java:106) at android.os.Looper.loop(Looper.java:193) at android.app.ActivityThread.main(ActivityThread.java:6711) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:911)
Beta Was this translation helpful? Give feedback.
All reactions