Code example for LocationManager

Methods: removeGpsStatusListenerremoveUpdates

0
//			} catch (IOException ex) { 
//				uiHandler.appendToTerminal("!!!Cannot close log file!!!"); 
//			} 
//		} 
		if (locationManager != null) {
			locationManager.removeGpsStatusListener(gpsListener);
			locationManager.removeUpdates(this);
			locationManager = null;
		} 
		mLastLocation = null;
		isGpsFixed = false;
		// release wake lock 
		wakeLock.release();
	} 
 
	@Override 
	public void onLocationChanged(Location location) {
		if (location == null) {
			return; 
		} 
Contextual code suggestions in your IDE  Get Codota for Java