Code example for LocationClient

Methods: addGeofences

0
 
        // Get a PendingIntent that Location Services issues when a geofence transition occurs 
        mGeofencePendingIntent = createRequestPendingIntent();
 
        // Send a request to add the current geofences 
        mLocationClient.addGeofences(mCurrentGeofences, mGeofencePendingIntent, this);
    } 
 
    /* 
     * Handle the result of adding the geofences 
     */ 
    @Override 
    public void onAddGeofencesResult(int statusCode, String[] geofenceRequestIds) {
    	 
        // Disconnect the location client 
        requestDisconnection(); 
    } 
 
    /** 
     * Get a location client and disconnect from Location Services 
     */