My app uses the new "immersive mode" by calling (in onCreate
):
getWindow().getDecorView().setSystemUiVisibility(View.SYSTEM_UI_FLAG_HIDE_NAVIGATION | View.SYSTEM_UI_FLAG_IMMERSIVE_STICKY);
This works great, but the "how-to" popup ("Swipe down from the top to exit full screen") appears every time the Activity is launched (if the phone is being locked while the activity was showing), even though the user has acknowledged the popup. As far as I understand, the popup is automatically generated by the system, so there's nothing I can do to change this situation, correct?
This issue is reproducible as follows:
- Launch immersive Activity [no popup appears, only on the very first launch (correctly)]
- Press the power button to switch off screen while the activity is showing
- Press power button again to switch on screen
- Close Activity by calling finish() e.g. from a button or menu option
- Launch Activity again - popup reappears
The popup does NOT reappear if the activity is launched, closed, and relaunched without hitting the power-button in between. Also, it ONLY reappears if the activity was topmost while the power button was pressed.
Correction: The Activity needs to be closed by calling "finish()" (e.g. from a button or a menu option). It works correctly if the Activity is closed by the back-key.
I've uploaded a sample app here: https://github.com/niko001/com.greatbytes.immersivebug/tree/master/Test5
EDIT: There's now an Xposed module to disable the "panic mode", so I guess I'm not alone in seeing this is an annoyance ;)