I need to minimize the application when back button is pressed.
I use following code to catch hardware back button click event
help me with the code of minimize on back key pressed
@Override
public boolean onKeyDown(int keyCode, keyEvent event) {
switch(keyCode) {
case KeyEvent.KEYCODE_BACK;
//minimize application
return true;
}
return super.onKeyDown(keyCode, event);
}