I want to know how to detect hard or soft "BACK Button"
on device? I searched but mostly I found this code
@Override
public boolean onKeyDown(int keyCode, KeyEvent event) {
if (keyCode == KeyEvent.KEYCODE_BACK && event.getRepeatCount() == 0) {
// do something on back.
return true;
}
return super.onKeyDown(keyCode, event);
}
But I just need to detect if there is BACK button exist on device or not in form of hard or soft.