本文整理了Java中com.google.android.gms.location.FusedLocationProviderClient.removeLocationUpdates()
方法的一些代码示例,展示了FusedLocationProviderClient.removeLocationUpdates()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。FusedLocationProviderClient.removeLocationUpdates()
方法的具体详情如下:
包路径:com.google.android.gms.location.FusedLocationProviderClient
类名称:FusedLocationProviderClient
方法名:removeLocationUpdates
暂无
代码示例来源:origin: commonsguy/cw-omnibus
@Override
protected void onStop() {
client.removeLocationUpdates(cb);
request=null;
super.onStop();
}
代码示例来源:origin: swentel/indigenous-android
/**
* Stop location updates.
*/
public void stopLocationUpdates() {
mFusedLocationClient.removeLocationUpdates(mLocationCallback);
}
代码示例来源:origin: aliumujib/Nibo
@Override
public void onPause() {
super.onPause();
mFusedLocationClient.removeLocationUpdates(mLocationCallback);
}
代码示例来源:origin: retomeier/Wrox-ProfessionalAndroid-4E
@Override
protected void onStop() {
super.onStop();
FusedLocationProviderClient fusedLocationClient = LocationServices.getFusedLocationProviderClient(this);
fusedLocationClient.removeLocationUpdates(mLocationCallback);
}
代码示例来源:origin: kingsammalik/SamLocationAndGeocoding
private void stopLocationUpdates() {
LocationServices.getFusedLocationProviderClient(context).removeLocationUpdates(
this);
Log.d("LocationRequestService", "Location update stopped .......................");
}
代码示例来源:origin: Attriumph/Place-Search-Service
private void stopLocationUpdates() {
if (!mRequestingLocationUpdates) {
Log.d(TAG, "stopLocationUpdates: updates never requested, no-op.");
return;
}
mFusedLocationClient.removeLocationUpdates(mLocationCallback)
.addOnCompleteListener((Activity) context, new OnCompleteListener<Void>() {
@Override
public void onComplete(@NonNull Task<Void> task) {
mRequestingLocationUpdates = false;
}
});
}
代码示例来源:origin: neXenio/BLE-Indoor-Positioning
public static void stopRequestingLocationUpdates() {
AndroidLocationProvider instance = getInstance();
if (!instance.isRequestingLocationUpdates) {
return;
}
Log.d(TAG, "Stopping to request location updates");
if (!instance.locationListeners.isEmpty()) {
Log.w(TAG, "There are still registered location listeners which won't receive new location updates");
}
instance.fusedLocationClient.removeLocationUpdates(instance.getLocationCallback());
instance.isRequestingLocationUpdates = false;
}
内容来源于网络,如有侵权,请联系作者删除!