Code example for LocationListener

Methods: onLocationChanged

0
		Handler stopUpdates = new Handler();
		stopUpdates.postDelayed(new Runnable() {
			@Override 
			public void run() { 
				locationManager.removeUpdates(Triangulator.this);
				listener.onLocationChanged(bestLocation);
			} 
		}, timeout);
	} 
	 
	private static final float MIN_DISTANCE = 500; // meters
	 
	// Code from http://developer.android.com/guide/topics/location/obtaining-user-location.html 
 
	private static final int TWO_MINUTES = 1000 * 60 * 2;
 
	 
	/** Determines whether one Location reading is better than the current Location fix 
	  * @param location  The new Location that you want to evaluate 
	  * @param currentBestLocation  The current Location fix, to which you want to compare the new one 
	  */