Code example for LocationClient

Methods: removeLocationUpdates

0
            MILLISECONDS_PER_SECOND * FASTEST_INTERVAL_IN_SECONDS;
	 
     
    //helper functions 
    private void stopPeriodicUpdates() { 
    	mLocationClient.removeLocationUpdates(this);
    } 
     
    private void startPeriodicUpdates() { 
    	mLocationClient.requestLocationUpdates(mLocationRequest, this);
    } 
     
    public void changeFocus(Location location) {
    	// Report to the UI that the location was updated 
        String msg = "Updated Location: " +
                Double.toString(location.getLatitude()) + "," +
                Double.toString(location.getLongitude());
    	Toast.makeText(this, "Focusing...", Toast.LENGTH_SHORT).show();
    	Toast.makeText(this, msg, Toast.LENGTH_SHORT).show();
    	LatLng latLng = new LatLng(location.getLatitude(), location.getLongitude());