how can I associate a method to home button of smartphone? I want that checking this botton my Android app does a specific method. I read that to disable home button there i
Try overriding onKeyDown as such:
@Override public boolean onKeyDown(int keyCode, KeyEvent event) { if (keyCode == KeyEvent.KEYCODE_HOME) // do what you need }