java.lang.RuntimeException: Unable to stop activity {com.entitcs.office_attendance/com.entitcs.office_attendance.CRM.InvoiceReport}: java.lang.IllegalStateException: Not allowed to start service Intent { cmp=com.entitcs.office_attendance/.background_works.ServiceToGetJustLatLng }: app is in background uid UidRecord{f50588c u0a270 SVC bg:+2m32s628ms idle change:idle procs:1 seq(0,0,0)} at android.app.ActivityThread.callActivityOnStop(ActivityThread.java:4469) at android.app.ActivityThread.performStopActivityInner(ActivityThread.java:4439) at android.app.ActivityThread.handleStopActivity(ActivityThread.java:4514) at android.app.servertransaction.StopActivityItem.execute(StopActivityItem.java:41) at android.app.servertransaction.TransactionExecutor.executeLifecycleState(TransactionExecutor.java:145) at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:70) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2026) at android.os.Handler.dispatchMessage(Handler.java:106) at android.os.Looper.loop(Looper.java:224) at android.app.ActivityThread.main(ActivityThread.java:7143) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:604) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:876) Caused by: java.lang.IllegalStateException: Not allowed to start service Intent { cmp=com.entitcs.office_attendance/.background_works.ServiceToGetJustLatLng }: app is in background uid UidRecord{f50588c u0a270 SVC bg:+2m32s628ms idle change:idle procs:1 seq(0,0,0)} at android.app.ContextImpl.startServiceCommon(ContextImpl.java:1611) at android.app.ContextImpl.startService(ContextImpl.java:1551) at android.content.ContextWrapper.startService(ContextWrapper.java:664) at android.content.ContextWrapper.startService(ContextWrapper.java:664) at l3.q3.onCreateView(Unknown Source:65) at androidx.fragment.app.Fragment.performCreateView(Unknown Source:19) at androidx.fragment.app.v.f(Unknown Source:188) at androidx.fragment.app.v.m(Unknown Source:116) at androidx.fragment.app.n.e0(Unknown Source:277) at androidx.fragment.app.n.f1(Unknown Source:84) at androidx.fragment.app.n.b0(Unknown Source:21) at androidx.fragment.app.n.T(Unknown Source:42) at androidx.fragment.app.n.U(Unknown Source:9) at androidx.fragment.app.i.r(Unknown Source:4) at androidx.fragment.app.e.onStop(Unknown Source:11) at androidx.appcompat.app.d.onStop(Unknown Source:0) at android.app.Instrumentation.callActivityOnStop(Instrumentation.java:1436) at android.app.Activity.performStop(Activity.java:7492) at android.app.ActivityThread.callActivityOnStop(ActivityThread.java:4461) ... 12 more