An IllegalStateException was thrown when trying to start a location service because the app was in the background. The exception occurred when requesting location permissions in the BaseMainActivity, which then called the serviceStart method to start the LocationBoundedService. Starting a service is not allowed when an app is in the background.
An IllegalStateException was thrown when trying to start a location service because the app was in the background. The exception occurred when requesting location permissions in the BaseMainActivity, which then called the serviceStart method to start the LocationBoundedService. Starting a service is not allowed when an app is in the background.
An IllegalStateException was thrown when trying to start a location service because the app was in the background. The exception occurred when requesting location permissions in the BaseMainActivity, which then called the serviceStart method to start the LocationBoundedService. Starting a service is not allowed when an app is in the background.
IllegalStateException: Not allowed to start service
Intent { cmp=com.masarylastversion/com.masary.locationservice.LocationBoundedService }: app is in background uid UidRecord{ae4fb8d u0a374 CAC bg:+9h6m13s726ms idle procs:1 proclist:30821, seq(2943,2943,2943)} at android.app.ContextImpl.startServiceCommon(ContextImpl.java:1688) at android.app.ContextImpl.startService(ContextImpl.java:1633) at android.content.ContextWrapper.startService(ContextWrapper.java:683) at com.masary.BaseActivities.BaseMainActivity.serviceStart(BaseMainActivity.java:126) at com.masary.BaseActivities.BaseMainActivity.requestLocationPermissions(BaseMainActiv ity.java:51) at com.masary.BaseActivities.BaseMainActivity.onStart(BaseMainActivity.java:78) at com.masary_UI.MainActivity.onStart(MainActivity.java:7014) at android.app.Instrumentation.callActivityOnStart(Instrumentation.java:1433) at android.app.Activity.performStart(Activity.java:7986) at android.app.ActivityThread.handleStartActivity(ActivityThread.java:3677) at android.app.servertransaction.TransactionExecutor.performLifecycleSequence(Transact ionExecutor.java:221) at android.app.servertransaction.TransactionExecutor.cycleToPath(TransactionExecutor.j ava:201) at android.app.servertransaction.TransactionExecutor.executeLifecycleState(Transaction Executor.java:173) at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java: 97) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2267) at android.os.Handler.dispatchMessage(Handler.java:107) at android.os.Looper.loop(Looper.java:237) at android.app.ActivityThread.main(ActivityThread.java:8167) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:496) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1100)