Không thể ghi đè (override) hoàn toàn nút Home (system button). Chỉ có thể xử lý khi app bị đẩy ra background qua onUserLeaveHint().
@Override
protected void onUserLeaveHint() {
Toast.makeText(this, "Home Button is Pressed", Toast.LENGTH_SHORT).show();
super.onUserLeaveHint();
}
Khi nhấn Home, Toast hiển thị "Home Button is Pressed" trước khi app ẩn.