How to display the lock screen on an Android device emulator (keystroke)

As a quick note, if you want to show the “lock screen” on an Android device emulator, press the F7 key twice. I’m currently working on an Android notifications app, so I want to see what the notifications look like on the lock screen, and I just discovered this approach.

I read that the F7 key emulates the “power” button, but for my purposes pressing it twice takes me to the lock screen. Actually, pressing it once seems to take me to the lock screen, but it doesn’t show my notifications, so I’ve been pressing it twice, which works consistently. (There may be a little more going on here than I’m currently aware of, but this definitely gets me to the lock screen.)

I’ve also found that sometimes I’ll go back to the emulator after a few minutes and found that it appears “frozen.” This isn’t the case, however; just press F7 again, and it will begin responding. I assume that is some type of sleep/off mode.

If that doesn't work for you for some reason, check out this Android documentation page, which shows all of the keystrokes supported by Android emulators.

Photo D8