I have an app in which it is essential that I execute some code when the user presses the centre button on an android device. I already process the user pressing the right hand button (the back button) via
onKeyDown(int keyCode, KeyEvent event) / if (keyCode == KeyEvent.KEYCODE_BACK) so I had assumed that pressing the centre button would be processed in a similar manner. But upon further investigation, it appears that onKeyDown is not called. So my question is; how to I intercept a centre-button press?
P.S. Much to my embarrassment, I'm not even sure what the centre button is called!</div