I know this question has been asked many times and the answer is always \"No we cant disable home button\".
I have a little different query to ask.
I wrote s
You may want to give this a try:
@Override
public void onBackPressed() {
}
@Override
protected void onUserLeaveHint() {
super.onUserLeaveHint();
((ActivityManager) getApplicationContext().getSystemService(Context.ACTIVITY_SERVICE)).moveTaskToFront(getTaskId(), 0);
}
@Override
protected void onPause() {
super.onPause();
((ActivityManager) getApplicationContext().getSystemService(Context.ACTIVITY_SERVICE)).moveTaskToFront(getTaskId(), 0);
}
Permissions needed -- add the following to manifest