@Override
 public void onDisconnected() {
   if (smartLocationOptions.isDebugging()) {
     Log.i(getClass().getSimpleName(), "disconnected");
   }
   setActivityRecognitionClient(null);
 }
 @Override
 public void onConnected(Bundle bundle) {
   if (smartLocationOptions.isDebugging()) {
     Log.i(getClass().getSimpleName(), "connected");
   }
   continueRemoveUpdates();
 }
 @Override
 public void onConnectionFailed(ConnectionResult connectionResult) {
   if (smartLocationOptions.isDebugging()) {
     Log.i(getClass().getSimpleName(), "connection failed");
   }
 }