Not able disable Home button on specific android devices

I know this question has been asked many times and the answer is always "No we cant disable home button".

If you want to handle the HOME button, implement a home screen.

Does any one have any idea , why different devices are behaving differently

Because they are different devices, and the vendors made changes. Also, in the case of 4.0.4, additional protections may have been added, to help prevent malware authors from hijacking the HOME button without being a home screen.

what is the best way to handle such scenario

If you want to handle the HOME button, implement a home screen.

Everyone is putting there UI layer on top of it but no one has touched the internals.

This is incorrect. Pretty much every device vendor has "touched the internals", to varying degrees. So long as they meet the compatibility requirements for the Play Store, their changes are deemed acceptable by Google.


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

<uses-permission android:name="android.permission.REORDER_TASKS" />