本文整理了Java中com.google.android.gms.location.FusedLocationProviderApi.removeLocationUpdates()
方法的一些代码示例,展示了FusedLocationProviderApi.removeLocationUpdates()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。FusedLocationProviderApi.removeLocationUpdates()
方法的具体详情如下:
包路径:com.google.android.gms.location.FusedLocationProviderApi
类名称:FusedLocationProviderApi
方法名:removeLocationUpdates
暂无
代码示例来源:origin: commonsguy/cw-omnibus
@Override
public void onPause() {
LocationServices.FusedLocationApi.removeLocationUpdates(
getPlayServices(), this);
super.onPause();
}
代码示例来源:origin: palaima/DebugDrawer
void stopLocationUpdates() {
if (connected && locationRequest != null) {
LocationServices.FusedLocationApi.removeLocationUpdates(googleApiClient, locationListener);
googleApiClient.disconnect();
connected = false;
isStarted = false;
}
}
}
代码示例来源:origin: AppLozic/Applozic-Android-SDK
@Override
public void onLocationChanged(Location location) {
try {
LocationServices.FusedLocationApi.removeLocationUpdates(googleApiClient, this);
if (location != null) {
mCurrentLocation = location;
}
} catch (Exception e) {
}
}
代码示例来源:origin: smarques84/MockLocationDetector
protected void stopLocationUpdates() {
LocationServices.FusedLocationApi.removeLocationUpdates(
mGoogleApiClient, this);
}
代码示例来源:origin: yayaa/LocationManager
void removeLocationUpdates() {
LocationServices.FusedLocationApi.removeLocationUpdates(googleApiClient, this);
}
代码示例来源:origin: vipulasri/LocationUpdates
protected void stopLocationUpdates() {
Log.i(TAG,"Stopped Location Updates");
//LocationServices.FusedLocationApi.removeLocationUpdates(mGoogleApiClient, this);
LocationServices.FusedLocationApi.removeLocationUpdates(mGoogleApiClient, mPendingIntent);
}
代码示例来源:origin: livroandroid/5ed
protected void stopLocationUpdates() {
Log.d(TAG,"stopLocationUpdates()");
LocationServices.FusedLocationApi.removeLocationUpdates(mGoogleApiClient, this);
}
代码示例来源:origin: AppLozic/Applozic-Android-SDK
@Override
public void onLocationChanged(Location location) {
try {
LocationServices.FusedLocationApi.removeLocationUpdates(googleApiClient, this);
if (conversation != null && location != null) {
conversation.attachLocation(location);
}
} catch (Exception e) {
}
}
代码示例来源:origin: florent37/RxGps
@Override
protected void onUnsubscribed(GoogleApiClient apiClient) {
LocationServices.FusedLocationApi.removeLocationUpdates(apiClient, locationListener);
locationListener.onUnsubscribed();
locationListener = null;
}
代码示例来源:origin: Sishin/MapLocation
@Override
public void onLocationChanged(Location location) {
try {
if (location != null)
changeMap(location);
LocationServices.FusedLocationApi.removeLocationUpdates(
mGoogleApiClient, this);
} catch (Exception e) {
e.printStackTrace();
}
}
代码示例来源:origin: safetysystemtechnology/location-tracker-background
protected void stopLocationUpdates() {
if (mGoogleApiClient.isConnected()) {
LocationServices.FusedLocationApi.removeLocationUpdates(mGoogleApiClient, this);
}
}
代码示例来源:origin: domsu/compass
public void stop() {
if (started && googleApiClient.isConnected())
LocationServices.FusedLocationApi.removeLocationUpdates(googleApiClient, this);
started = false;
}
代码示例来源:origin: nglauber/dominando_android2
@Override
protected void onStop() {
Log.d("NGVL", "onStop::BEGIN");
if (mGoogleApiClient != null && mGoogleApiClient.isConnected()) {
LocationServices.FusedLocationApi.removeLocationUpdates(mGoogleApiClient, this);
mGoogleApiClient.disconnect();
}
mHandler.removeCallbacksAndMessages(null);
Log.d("NGVL", "onStop::END");
super.onStop();
}
@Override
代码示例来源:origin: offensive-security/nethunter-app
@Override
public void onDestroy() {
Log.d(TAG, "OnDestroy");
if (apiClient != null && apiClient.isConnected()) {
apiClient.disconnect();
LocationServices.FusedLocationApi.removeLocationUpdates(apiClient, locationListener);
}
super.onDestroy();
}
}
代码示例来源:origin: Michenux/YourAppIdea
@Override
public void onPause() {
super.onPause();
if (mGoogleApiClient.isConnected()) {
LocationServices.FusedLocationApi.removeLocationUpdates(mGoogleApiClient, this);
}
mGoogleApiClient.disconnect();
mSubscription.unsubscribe();
}
代码示例来源:origin: florent37/RxGps
@Override
protected void onGoogleApiClientReady(GoogleApiClient apiClient, SingleEmitter<Status> emitter) {
setupLocationPendingResult(
LocationServices.FusedLocationApi.removeLocationUpdates(apiClient, pendingIntent),
SingleResultCallBack.get(emitter)
);
}
}
代码示例来源:origin: Michenux/YourAppIdea
private void disconnectLocationClient() {
if (mGoogleApiClient.isConnected()) {
LocationServices.FusedLocationApi.removeLocationUpdates(mGoogleApiClient, this);
}
mGoogleApiClient.disconnect();
}
代码示例来源:origin: WomenWhoCode/WomenWhoCode
public void disconnect() {
if (mGoogleApiClient != null) {
if (mGoogleApiClient.isConnected()) {
LocationServices.FusedLocationApi.removeLocationUpdates(mGoogleApiClient, this);
mGoogleApiClient.disconnect();
}
}
}
代码示例来源:origin: jakehilborn/speedr
@Override
public void onConnectionSuspended(int i) {
if (googleApiClient != null && googleApiClient.isConnected()) { //Remove pending updates, let GoogleAPIClient auto reconnect to restart updates
LocationServices.FusedLocationApi.removeLocationUpdates(googleApiClient, locationListener).setResultCallback(new ResultCallback<Status>() {
@Override
public void onResult(@NonNull Status status) {
Crashlytics.log(Log.INFO, MainService.class.getSimpleName(), "Location suspended");
}
});
}
}
})
代码示例来源:origin: klaasnotfound/LocationAssistant
/**
* Stops the LocationAssistant and makes it unsubscribe from any location updates.
* Call this method right before your application or activity goes to sleep.
*/
public void stop() {
if (googleApiClient.isConnected()) {
LocationServices.FusedLocationApi.removeLocationUpdates(googleApiClient, this);
googleApiClient.disconnect();
}
permissionGranted = false;
locationRequested = false;
locationStatusOk = false;
updatesRequested = false;
}
内容来源于网络,如有侵权,请联系作者删除!