I\'m trying to make an application where the user can override the default behaviour of the volume up/down buttons (as well as the screen on/off button - is this possible?).
This is not (easily) possible, because the "onKeyDown" method is overriding Activity.onKeyDown(). For this reason, you have to have a foreground activity to receive these function calls.
I don't have any experience doing this, but you would have to dig a bit deeper into writing your own hardware key intercept/handler functions, since you wouldn't be able to access the one from the activity class.