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

Caused by: java.lang.IllegalStateException: Not allowed to start service Intent { cmp=com.*.*/com.ixuea.android.downloader.DownloadService }: app is in background #45

Open
rommansabbir opened this issue Jun 1, 2024 · 0 comments

Comments

@rommansabbir
Copy link

When app start, randomly I'm getting this error:

Caused by: java.lang.IllegalStateException: Not allowed to start service Intent { cmp=com.*.*/com.ixuea.android.downloader.DownloadService }: app is in background uid UidRecord{39694b8 u0a207 SVC  idle change:idle|uncached procs:1 seq(0,0,0)}
                        	at android.app.ContextImpl.startServiceCommon(ContextImpl.java:1795)
                        	at android.app.ContextImpl.startService(ContextImpl.java:1740)
                        	at android.content.ContextWrapper.startService(ContextWrapper.java:738)
                        	at com.ixuea.android.downloader.DownloadService.getDownloadManager(DownloadService.java:31)
                        	at com.ixuea.android.downloader.DownloadService.getDownloadManager(DownloadService.java:25)
                        	at com.*.APAppUpdater.init(APAppUpdater.kt:29)
                        	at com.*MyApp.onCreate(MyApp.kt:27)
                        	at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1192)
                        	at android.app.ActivityThread.handleBindApplication(ActivityThread.java:7527)
                        	at android.app.ActivityThread.access$1400(ActivityThread.java:301) 
                        	at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2150) 
                        	at android.os.Handler.dispatchMessage(Handler.java:106) 
                        	at android.os.Looper.loop(Looper.java:246) 
                        	at android.app.ActivityThread.main(ActivityThread.java:8587) 
                        	at java.lang.reflect.Method.invoke(Native Method) 
                        	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:602) 
                        	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1130
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant