when i start a google maps navigation it keeps the screen alive and if i turn it off and on again with the power button, the maps app is above the lockscreen and only when i minimize the app, i have to unlock the screen. So i can turn the screen off and on and still use the app without having to unlock the screen
How can i achieve that for my own app?
I know i cann keep the screen on with
getWindow().addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON);
but that doesn't prevent me from having to unlock the screen after turning it off and on again.