Code example for LocationClient

Methods: addGeofencesrequestLocationUpdates

	public void onConnected(Bundle arg0) {
		Toast.makeText(this, "Connected", Toast.LENGTH_LONG).show();
		mClient.requestLocationUpdates(mRequest, this);
		// Build a Geofence 
		Geofence fence = new Geofence.Builder()
				.setCircularRegion(22.998881, 120.216082, 2000)
		// Method 1: Using IntentService 
		// Create a Intent to be sent to IntentService 
		Intent intent = new Intent(this, GeofenceIntentSerivce.class); 
		// Start a PendingIntent service 
		PendingIntent pendingIntent = PendingIntent.getService(this, 0, intent, PendingIntent.FLAG_UPDATE_CURRENT); 
		// Method 2: Using Broadcast 
		Intent intent = new Intent();
		intent.setAction(GeofenceEventReceiver.GEOFENCE_EVENTS); // Specify the action, a.k.a. receivers
		intent.putExtra("Location", "NCKU");
		PendingIntent pendingIntent = PendingIntent.getBroadcast(this, 0, intent, PendingIntent.FLAG_UPDATE_CURRENT);
		// Send out the Geofence request 
		mClient.addGeofences(mList, pendingIntent, this);
	public void onDisconnected() { 
Connect your IDE to all the code out there  Get Codota for Java