Background location service is not working in oppo and MI phones
问题 In my android application,location service is implemented as background service.I have tested it with different phones(like samsung,micromax,Moto,lenovo,nexus) it works fine with all.But when i run in Oppo (colorOS) and MI (MIUI OS),my service is get stopped after some time interval.I have finished MainActivity with MainActivity.this.finish(). 回答1: put following code on your activity above oncreate() method: private FusedLocationProviderClient mFusedLocationClient; EasyPermissionsLocation