I'm implementing lock screen apps, user required to key in passcode and unlock the device for some duration.
I test in Samsung Note 3 and xiaomi redmi 1.
All the physical buttons in Note 3 has been locked, but somehow I cannot disable xiaomi redmi 1's home button. **The home button will run onPause event.
I used the code couldn't show the button in logcat.
@Override
public boolean dispatchKeyEvent(KeyEvent event) {
Log.d("button", String.valueOf(event.getKeyCode()));
return true;
}
I've try to use onPause and run my apps again, but it respond slow.
@Override
public void onPause() {
super.onPause();.
Intent intent = new Intent(LockScreenActivity.this, SettingActivity.class);
startActivity(intent);
}