Code example for Criteria

Methods: setAccuracy, setAltitudeRequired, setBearingRequired, setCostAllowed, setPowerRequirement, setSpeedRequired

0
		return c;
	} 
 
	/** this criteria needs high accuracy, high power, and cost */ 
	public static Criteria createFineCriteria() {
		Criteria c = new Criteria();
		c.setAccuracy(Criteria.ACCURACY_FINE);
		c.setAltitudeRequired(false);
		c.setBearingRequired(false);
		c.setSpeedRequired(false);
		c.setCostAllowed(true);
		c.setPowerRequirement(Criteria.POWER_HIGH);
		return c;
	} 
 
	@Override 
	public void onLocationChanged(Location location) {
		Log.d(TAG, "onLocationChanged: received location update");
 
		// display notification 
		Intent notificationIntent = new Intent(this, MTActivity.class);