@RequiresPermission(allOf = {Manifest.permission.ACCESS_FINE_LOCATION, Manifest.permission.ACCESS_COARSE_LOCATION})
public void removeLocationUpdates() {
if (Configuration.sIsFeatureLocationAvailable) {
LogHelper.debugLog(TAG, "Removing location updates...");
try {
mLocationManager.removeUpdates(this);
mIsRequestingLocationUpdates = false;
} catch (SecurityException e) {
LogHelper.errorLog(TAG, "Error while trying to remove location updates; " + e.getMessage());
e.printStackTrace();
}
} else {
LogHelper.warnLog(TAG, "Will not remove location updates, location feature is not available");
}
}
LocationService.java 文件源码
java
阅读 45
收藏 0
点赞 0
评论 0
项目:Android-Location-Tracker
作者:
评论列表
文章目录