Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Android 8+: Not allowed to start service Intent #1078

Closed
sergiomartinez4 opened this issue Jul 12, 2018 · 0 comments
Closed

Android 8+: Not allowed to start service Intent #1078

sergiomartinez4 opened this issue Jul 12, 2018 · 0 comments
Assignees
Labels
Milestone

Comments

@sergiomartinez4
Copy link

What problem do you get?
I'm getting the exact same issue as ticket #1017 but when using process.non-separate=true.

Which version of FileDownloader are you using when you produce such problem?
I'm using the latest version: 1.7.4

How to reproduce such problem?
Add process.non-separate=true to filedownloader.properties.
Then follow steps as with ticket #1017

Exception logcat

E: FATAL EXCEPTION: main
   Process: com.brightcove.player.test.exo2, PID: 9875
   java.lang.RuntimeException: Error receiving broadcast Intent { act=android.net.conn.CONNECTIVITY_CHANGE flg=0x4000010 (has extras) } in com.brightcove.player.network.ConnectivityMonitor$1@64fb744
       at android.app.LoadedApk$ReceiverDispatcher$Args.lambda$-android_app_LoadedApk$ReceiverDispatcher$Args_52497(LoadedApk.java:1323)
       at android.app.-$Lambda$aS31cHIhRx41653CMnd4gZqshIQ.$m$7(Unknown Source:4)
       at android.app.-$Lambda$aS31cHIhRx41653CMnd4gZqshIQ.run(Unknown Source:39)
       at android.os.Handler.handleCallback(Handler.java:790)
       at android.os.Handler.dispatchMessage(Handler.java:99)
       at android.os.Looper.loop(Looper.java:164)
       at android.app.ActivityThread.main(ActivityThread.java:6494)
       at java.lang.reflect.Method.invoke(Native Method)
       at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:438)
       at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:807)
    Caused by: java.lang.IllegalStateException: Not allowed to start service Intent { cmp=com.brightcove.player.test.exo2/com.liulishuo.filedownloader.services.FileDownloadService$SharedMainProcessService }: app is in background uid UidRecord{8d32f03 u0a355 LAST bg:+3m7s444ms idle change:cached procs:1 seq(0,0,0)}
       at android.app.ContextImpl.startServiceCommon(ContextImpl.java:1521)
       at android.app.ContextImpl.startService(ContextImpl.java:1477)
       at android.content.ContextWrapper.startService(ContextWrapper.java:650)
       at com.liulishuo.filedownloader.FileDownloadServiceSharedTransmit.bindStartByContext(FileDownloadServiceSharedTransmit.java:145)
       at com.liulishuo.filedownloader.FileDownloadServiceProxy.bindStartByContext(FileDownloadServiceProxy.java:120)
       at com.liulishuo.filedownloader.FileDownloader.pauseAll(FileDownloader.java:282)
       at com.brightcove.player.network.DownloadManager$1.onConnectivityChanged(DownloadManager.java:120)
       at com.brightcove.player.network.ConnectivityMonitor$1.onReceive(ConnectivityMonitor.java:260)
       at android.app.LoadedApk$ReceiverDispatcher$Args.lambda$-android_app_LoadedApk$ReceiverDispatcher$Args_52497(LoadedApk.java:1313)
       at android.app.-$Lambda$aS31cHIhRx41653CMnd4gZqshIQ.$m$7(Unknown Source:4) 
       at android.app.-$Lambda$aS31cHIhRx41653CMnd4gZqshIQ.run(Unknown Source:39) 
       at android.os.Handler.handleCallback(Handler.java:790) 
       at android.os.Handler.dispatchMessage(Handler.java:99) 
       at android.os.Looper.loop(Looper.java:164) 
       at android.app.ActivityThread.main(ActivityThread.java:6494) 
       at java.lang.reflect.Method.invoke(Native Method) 
       at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:438) 
       at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:807) 
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants