26

Is there a way to get the android emulator into sleep mode?

ninjasense
  • 13,756
  • 19
  • 75
  • 92

4 Answers4

36

Try pressing F7. That should at least send you back to the lock screen.

Ryan Berger
  • 9,644
  • 6
  • 44
  • 56
  • does this emulate sleep mode though or just lock the phone? – ninjasense Dec 10 '10 at 17:29
  • @ninjasense: Pressing F7 simulates pressing the power button. Of course, you can also click on your emulators power button. – John Dec 10 '10 at 17:55
  • 7
    I think this is not the correct answer to the question... I am also trying to find out how to put the emulator to sleep just as a phone does - but the lock screen is NOT sleep mode. :-( – Zordid Feb 13 '11 at 21:14
  • @Zordid you're right, the question was how to emulate the display timeout e.g. after 15 secs of inactivity. So you can check whether your app disables standby mode correctly. – Matthias B Jan 27 '13 at 13:08
5

Press F7+F2 to get your emulator locked.

Anurag Singla
  • 51
  • 1
  • 3
5

You might try PowerManager.gotosleep()

John
  • 15,418
  • 12
  • 44
  • 65
0

Go to Settings -> Display -> Screen timeout

Selecting one of the options in Screen timeout will allow you to change the time it takes the emulator to go to sleep.

Anne
  • 259
  • 3
  • 4