title: Taking over the volume key on Android
body: <p>I want to take overinput over the Volume Up and Down. At the moment my code is:</p>
  
  <pre><code>@Override
  public boolean onKeyDown(int keyCode, KeyEvent event) {
  
      Log.v(TAG, event.toString());
      if (keyCode == KeyEvent.KEYCODE_VOLUME_DOWN){
          mLamp.moveBackward();
  
          return false;
      }
      else if(keyCode == KeyEvent.KEYCODE_VOLUME_UP){
          mLamp.moveForward();
  
          return false;
      }
  
      return true;
  }
  public boolean onKeyUp(int keyCode, KeyEvent event) {
  
      Log.v(TAG, event.toString());
      if (keyCode == KeyEvent.KEYCODE_VOLUME_DOWN){
          return false;
      }
      else if(keyCode == KeyEvent.KEYCODE_VOLUME_UP){
          return false;
      }
  
      return true;
  }
  </code></pre>
  
  <p>This triggers the <code>mLamp.moveBackward()</code> and <code>mLamp.moveForward()</code> function but it still changes the volume of the ringer.
  What do I have to do that the ringer loudness doesn't change?</p>