java.lang.RuntimeException: Unable to start service com.entitcs.office_attendance.background_works.ServiceToGetJustLatLng@b0f4111 with Intent { cmp=com.entitcs.office_attendance/.background_works.ServiceToGetJustLatLng mCallingUid=10298 }: android.app.BackgroundServiceStartNotAllowedException: Not allowed to start service Intent { cmp=com.entitcs.office_attendance/.background_works.MyLocationService }: app is in background uid UidRecord{c3b3903 u0a298 SVC idle change:idle|uncached|procstate procs:0 seq(10964065,10964065)} caps=------ at android.app.ActivityThread.handleServiceArgs(ActivityThread.java:5134) at android.app.ActivityThread.-$$Nest$mhandleServiceArgs(Unknown Source:0) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2481) at android.os.Handler.dispatchMessage(Handler.java:106) at android.os.Looper.loopOnce(Looper.java:257) at android.os.Looper.loop(Looper.java:368) at android.app.ActivityThread.main(ActivityThread.java:8839) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:572) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1049) Caused by: android.app.BackgroundServiceStartNotAllowedException: Not allowed to start service Intent { cmp=com.entitcs.office_attendance/.background_works.MyLocationService }: app is in background uid UidRecord{c3b3903 u0a298 SVC idle change:idle|uncached|procstate procs:0 seq(10964065,10964065)} caps=------ at android.app.ContextImpl.startServiceCommon(ContextImpl.java:1985) at android.app.ContextImpl.startService(ContextImpl.java:1930) at android.content.ContextWrapper.startService(ContextWrapper.java:835) at com.entitcs.office_attendance.background_works.ServiceToGetJustLatLng.c(Unknown Source:172) at com.entitcs.office_attendance.background_works.ServiceToGetJustLatLng.d(Unknown Source:34) at com.entitcs.office_attendance.background_works.ServiceToGetJustLatLng.onStartCommand(Unknown Source:69) at android.app.ActivityThread.handleServiceArgs(ActivityThread.java:5116) ... 9 more