@Override public void onConnectionSuspended(int i) { if (geofenceRequestIntent != null) LocationServices.GeofencingApi.removeGeofences(mGoogleApiClient, geofenceRequestIntent); onGeofencePreparedListener.onError(null, "onConnectionSuspended"); }
@Override public void onConnectionFailed(ConnectionResult connectionResult) { onGeofencePreparedListener.onError(connectionResult, null); }
@Override public void onConnected(Bundle bundle) { geofenceRequestIntent = getGeofenceTransitionPendingIntent(); onGeofencePreparedListener.onSuccess(mGoogleApiClient, geofenceRequestIntent); }