Is it possible to change this code:
@Override
public boolean onKeyDown(int keyCode, KeyEvent event) {
if (keyCode == KeyEvent.KEYCODE_BACK) {
}
try this,
@Override
public void onBackPressed() {
Intent backtoHome = new Intent(Intent.ACTION_MAIN);
backtoHome.addCategory(Intent.CATEGORY_HOME);
backtoHome.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
startActivity(backtoHome);
}
Adding this to your Activity, will make it look like your app is responding to a Home Button Click event