Code example for LocationManager

Methods: removeGpsStatusListenerremoveUpdates

0
		// Hook in our GpsStatus.Listener 
		locationManager.addGpsStatusListener(myGPSStatus);
    } 
     
    void stopGPS() { 
    	locationManager.removeGpsStatusListener(myGPSStatus);
    	locationManager.removeUpdates(this);
		if (myGPSDisplay != null) {
			myGPSDisplay.updateLastInfo();
		} 
    } 
 
////////////////////////////////////////////////////////////////////////////////////////// 
		 
////////////////////////////////////////////////////////////////////////////////////////// 
// Startup code 
////////////////////////////////////////////////////////////////////////////////////////// 
    /** 
     * Class for clients to access.  Because we know this service always 
     * runs in the same process as its clients, we don't need to deal with 
     * IPC.