Example usage for android.location LocationManager removeGpsStatusListener

List of usage examples for android.location LocationManager removeGpsStatusListener

Introduction

In this page you can find the example usage for android.location LocationManager removeGpsStatusListener.

Prototype

@Deprecated
public void removeGpsStatusListener(GpsStatus.Listener listener) 

Source Link

Document

Removes a GPS status listener.

Usage

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;
    }
}