Code example for LocationManager

Methods: removeGpsStatusListenerremoveUpdates

0
    @Override 
    public synchronized void onDestroy() { 
        super.onDestroy(); 
        //Log.d(LOG_NAME, "We've been destroyed"); 
        if (gpsListener != null) {
            lm.removeGpsStatusListener(gpsListener);
            lm.removeUpdates(gpsListener);
        } 
 
        if (theGPSThread != null) {
            theGPSThread.quit();
        } 
    } 
} 
Experience pair programming with AI  Get Codota for Java