I was looking for a way to use sound controls on android to control remotely (from device) omxplayer running on raspberry pi:
Here is code how to do this easily on processing:
void keyPressed() { if (key == CODED && keyCode == android.view.KeyEvent.KEYCODE_VOLUME_DOWN) { println ("Volume down"); } if (key == CODED && keyCode == android.view.KeyEvent.KEYCODE_VOLUME_UP) { println ("Volume up"); } }