How to simulate sleep mode on Android emulator
The Power Button
on the sidebar next to emulator will do it.
The hotkey on my Mac is ⌘ P
Note: You will need to set Lock Screen using Swipe instead of None
On emulator, go Settings/Security/Screen lock change from 'None' to 'Swipe'
Then, click 'power' button on right control bar to turn off screen, and press again to turn on screen. Now the lock screen will show up.
Try the following on emulator
- Go to
Settings
- Go to
Developer options
- Un-check
Stay awake
(3rd option from the top)
The emulator will go to sleep after 1 min (default setting) if not changed.
Press the power button to wake up the emulator.
Developer options
is not enabled by default, to enable it, do the following:
- Go to
Settings
- Click
About emulated device
- Click
Build number
7 times, you should be notified thatDeveloper options
is now enabled - Go back and you should see
Developer options