java.lang.RuntimeException: Unable to resume activity {com.entitcs.office_attendance/com.entitcs.office_attendance.activities.Drawer_Activity}: android.app.BackgroundServiceStartNotAllowedException: Not allowed to start service Intent { cmp=com.entitcs.office_attendance/.background_works.ServiceToGetJustLatLng }: app is in background uid UidRecord{74b3183 u0a688 TPSL bg:+2m9s983ms idle change:procadj procs:0 seq(786775,786386)} at android.app.ActivityThread.performResumeActivity(ActivityThread.java:5378) at android.app.ActivityThread.handleResumeActivity(ActivityThread.java:5444) at android.app.servertransaction.TransactionExecutor.performLifecycleSequence(TransactionExecutor.java:225) at android.app.servertransaction.TransactionExecutor.cycleToPath(TransactionExecutor.java:201) at android.app.servertransaction.TransactionExecutor.executeLifecycleState(TransactionExecutor.java:173) at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:97) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2574) at android.os.Handler.dispatchMessage(Handler.java:106) at android.os.Looper.loopOnce(Looper.java:226) at android.os.Looper.loop(Looper.java:313) at android.app.ActivityThread.main(ActivityThread.java:8762) 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:1067) Caused by: android.app.BackgroundServiceStartNotAllowedException: Not allowed to start service Intent { cmp=com.entitcs.office_attendance/.background_works.ServiceToGetJustLatLng }: app is in background uid UidRecord{74b3183 u0a688 TPSL bg:+2m9s983ms idle change:procadj procs:0 seq(786775,786386)} at android.app.ContextImpl.startServiceCommon(ContextImpl.java:1981) at android.app.ContextImpl.startService(ContextImpl.java:1927) at android.content.ContextWrapper.startService(ContextWrapper.java:834) at android.content.ContextWrapper.startService(ContextWrapper.java:834) at com.entitcs.office_attendance.activities.Drawer_Activity.rotateImage(Drawer_Activity.java:3443) at com.entitcs.office_attendance.activities.Drawer_Activity.onResume(Drawer_Activity.java:3405) at android.app.Instrumentation.callActivityOnResume(Instrumentation.java:1531) at android.app.Activity.performResume(Activity.java:8734) at android.app.ActivityThread.performResumeActivity(ActivityThread.java:5351) ... 13 more