Code example for LocationClient

Methods: addGeofences

0
	} 
 
	@Override 
	public void onConnected(Bundle dataBundle) {
		PendingIntent pendingIntent = getTransitionPendingIntent();
		mLocationClient.addGeofences(geofences, pendingIntent, this);
	} 
 
	@Override 
	public void onAddGeofencesResult(int statusCode, String[] geofenceRequestIds) {
		if (LocationStatusCodes.SUCCESS == statusCode) {
			Log.i("Geofence add","Geofence add success");
		} else { 
			Log.e("Geofence", ""+statusCode+" "+LocationStatusCodes.ERROR+" "+LocationStatusCodes.GEOFENCE_NOT_AVAILABLE);
			Log.e("Geofence add","Geofence add failed");
		} 
		// Turn off the in progress flag and disconnect the client 
		mInProgress = false;
		mLocationClient.disconnect();
	}