My problem is that when I lock my Android phone with my flutter app in the foreground.
And then I wake the phone up, instead of taking me to the lock screen to give the password to unlock the phone, it takes me right to the flutter app, without any authentication.
How could this be resolved? Have anyone met this problem too?
CodePudding user response:
Check your manifest file. like below:
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED"/>
<uses-permission android:name="android.permission.WAKE_LOCK" />
CodePudding user response:
add android:showWhenLocked="false" to your MainActivity in AndroidManifest.xml
<activity
android:showWhenLocked="false"