Code example for LocationClient

Methods: addGeofences

        // Get a PendingIntent that Location Services issues when a geofence transition occurs 
        mGeofencePendingIntent = createRequestPendingIntent();
        // Send a request to add the current geofences 
        try { 
            mLocationClient.addGeofences(mCurrentGeofences, mGeofencePendingIntent, this);
        } catch (IllegalArgumentException e) {
            Log.e("Geofence", "Oh no! They are empty!");
     * Handle the result of adding the geofences 
    public void onAddGeofencesResult(int statusCode, String[] geofenceRequestIds) {
        // Create a broadcast Intent that notifies other components of success or failure 
        Intent broadcastIntent = new Intent();