java.lang.RuntimeException: Unable to start service com.entitcs.office_attendance.background_works.ServiceToGetJustLatLng@b4e0748 with Intent { cmp=com.entitcs.office_attendance/.background_works.ServiceToGetJustLatLng }: java.lang.NullPointerException: Attempt to invoke virtual method 'int android.content.Context.checkPermission(java.lang.String, int, int)' on a null object reference at android.app.ActivityThread.handleServiceArgs(ActivityThread.java:3355) at android.app.ActivityThread.access$2400(ActivityThread.java:186) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1704) at android.os.Handler.dispatchMessage(Handler.java:111) at android.os.Looper.loop(Looper.java:238) at android.app.ActivityThread.main(ActivityThread.java:6006) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:937) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:798) Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'int android.content.Context.checkPermission(java.lang.String, int, int)' on a null object reference at android.content.ContextWrapper.checkPermission(ContextWrapper.java:648) at w.g.a(SourceFile) at com.entitcs.office_attendance.background_works.ServiceToGetJustLatLng.(SourceFile) at com.entitcs.office_attendance.background_works.ServiceToGetJustLatLng.onStartCommand(SourceFile) at android.app.ActivityThread.handleServiceArgs(ActivityThread.java:3325) ... 8 more