Using FLAG_SHOW_WHEN_LOCKED with disableKeyguard() in secured Android lock screen

后端 未结 5 1744
轻奢々
轻奢々 2021-01-30 11:33

The Context

Recently, I have been looking for reliable ways to control a secured Android Keyguard. Mainly to display a custom lock screen. I know that Google had state

5条回答
  •  误落风尘
    2021-01-30 12:02

    In your LockScreenActivity, ending the validation code by finish(); kills the LockscreenActivity and thus the whole app. Instead of that, you could just launch back your main activity (or any other) like this :

    startActivity(new Intent(LockScreenActivity.this, MainActivity.class));
    

提交回复
热议问题