List of usage examples for android.location LocationManager removeGpsStatusListener
@Deprecated public void removeGpsStatusListener(GpsStatus.Listener listener)
From source file:uk.ac.horizon.ug.exploding.client.LocationUtils.java
public static void unregisterOnThread(Context context, LocationListener locationCallback, Listener listener) { Log.i(TAG, "Unregister for location events"); LocationManager locationManager = (LocationManager) context.getSystemService(Context.LOCATION_SERVICE); if (locationCallback != null) locationManager.removeUpdates(locationCallback); if (listener != null) locationManager.removeGpsStatusListener(listener); }
From source file:org.mozilla.mozstumbler.service.stumblerthread.scanners.GPSScanner.java
public void stop() { LocationManager lm = getLocationManager(); lm.removeUpdates(this); reportLocationLost();// w ww. j a v a2 s. c om if (mGPSListener != null) { lm.removeGpsStatusListener(mGPSListener); mGPSListener = null; } }