Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Cannot wake up Android emulator from sleep mode

I need to test the behavior of my app in sleep mode. How to enable sleep mode, I found in this Stackoverflow article. As stated, about 1min after the screen of emulator goes to black.

The problem is now, I cannot wake the emulator back up again. No clicking and not hotkeys (F7, CTRL+H, etc.) What do I do wrong. Or do I habe a misunderstanding with the sleep mode, in general.

In principle, I could use a real device, but here I have not control when the phones goes to (deep) sleep, what makes it difficult to test.

like image 741
Christian Avatar asked Feb 08 '17 09:02

Christian


People also ask

Why is my Android Emulator not working?

If the emulator fails to launch due to the error vulkan-1. dll cannot be found , you probably need to update the emulator. To update the emulator in Android Studio, go to Tools > SDK Manager and install the latest stable version of Android platform.

Why is emulator not responding?

If the Android Emulator does not start properly, this problem is often caused by problems with HAXM. HAXM issues are often the result of conflicts with other virtualization technologies, incorrect settings, or an out-of-date HAXM driver. Try reinstalling the HAXM driver, using the steps detailed in Installing HAXM.


2 Answers

I found that calling the emulator actually wakes up the phone as well.

android emulator call function

like image 98
Heng Tan Avatar answered Oct 13 '22 22:10

Heng Tan


I solved by checking "Stay awake" in "Settings -> Developer options -> Stay awake (screen will never sleep while charting)". And make sure set in emulator settings UI "(three dots) -> Battery -> Charger connection -> AC Charger"

like image 20
Gilian Avatar answered Oct 13 '22 22:10

Gilian