如何在Android模拟器上模拟睡眠模式 [英] How to simulate sleep mode on Android emulator

查看:169
本文介绍了如何在Android模拟器上模拟睡眠模式的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的Android应用程序的某些用户在手机进入睡眠/省电模式时报告错误.

Some users of my Android application report bugs when the mobile enters sleep/power saving mode.

我想在Android虚拟设备上测试该问题.是否可以在AVD上模拟手机进入睡眠/省电模式?

I would like to test that issue on the Android Virtual Device. Is it possible to simulate the mobile entering in sleep/power saving mode on the AVD ?

谢谢.

推荐答案

在模拟器上尝试以下操作

Try the following on emulator

  1. 转到Settings
  2. 转到Developer options
  3. 取消选中Stay awake(顶部的第3个选项)
  1. Go to Settings
  2. Go to Developer options
  3. Un-check Stay awake (3rd option from the top)

如果未更改,模拟器将在1分钟后进入睡眠状态(默认设置).

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默认情况下未启用,要启用它,请执行以下操作:

Developer options is not enabled by default, to enable it, do the following:

  1. 转到Settings
  2. 点击About emulated device
  3. 单击Build number 7次,系统会通知您Developer options已启用
  4. 返回,您应该会看到Developer options
  1. Go to Settings
  2. Click About emulated device
  3. Click Build number 7 times, you should be notified that Developer options is now enabled
  4. Go back and you should see Developer options

这篇关于如何在Android模拟器上模拟睡眠模式的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆