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

查看:49
本文介绍了如何在 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 ?

提前致谢.

推荐答案

在模拟器上试试下面的

  1. 转到设置
  2. 转到开发者选项
  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 is not enabled by default, to enable it, do the following:

  1. 转到设置
  2. 点击关于模拟设备
  3. 点击Build number 7 次,应该会通知您Developer options 现已启用
  4. 返回,你应该会看到开发者选项
  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天全站免登陆