java.lang.RuntimeException: Unable to start activity ComponentInfo{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{3690df2 u0a121 TPSL idle change:procadj procs:0 seq(30766070,30765718)} at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3897) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:4043) at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:101) at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:135) at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:95) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2437) at android.os.Handler.dispatchMessage(Handler.java:106) at android.os.Looper.loopOnce(Looper.java:211) at android.os.Looper.loop(Looper.java:300) at android.app.ActivityThread.main(ActivityThread.java:8294) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:580) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1028) 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{3690df2 u0a121 TPSL idle change:procadj procs:0 seq(30766070,30765718)} at android.app.ContextImpl.startServiceCommon(ContextImpl.java:1918) at android.app.ContextImpl.startService(ContextImpl.java:1874) at android.content.ContextWrapper.startService(ContextWrapper.java:827) at android.content.ContextWrapper.startService(ContextWrapper.java:827) at com.entitcs.office_attendance.activities.Drawer_Activity.onCreate(Unknown Source:323) at android.app.Activity.performCreate(Activity.java:8538) at android.app.Activity.performCreate(Activity.java:8502) at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1437) at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3878) ... 12 more