@Override
 public void stopListening() {
   sensorManager.unregisterListener(this, accelorometerSensor);
   isListening = hasBeenTripped = false;
   sensorChangeMonitor.reset();
   resetAlarmService();
   binder.onDisarmed();
 }
 @Override
 public void sensorMonitorTripped() {
   if (!hasBeenTripped) {
     startAlarmService();
     binder.onTripped();
     hasBeenTripped = true;
   }
 }
  @Override
  public void startListening() {
    if (isListening) return;

    isListening =
        sensorManager.registerListener(
            this, accelorometerSensor, SensorManager.SENSOR_DELAY_NORMAL);

    if (isListening) binder.onArmed();
  }
 public void updateBinder() {
   if (hasBeenTripped) binder.onTripped();
   else if (isListening) binder.onArmed();
   else binder.onDisarmed();
 }