Just wondering whether anyone could tell me how to capture the long keypress of the volume down key in android.
Elaborated question:
I wanted to create a
may be below code will help you:
@Override public boolean onKeyLongPress(int keyCode, KeyEvent event) { if (keyCode == KeyEvent.KEYCODE_VOLUME_DOWN) { // to your stuff here return true; } return super.onKeyLongPress(keyCode, event); }