Simulate the connect and disconnect of the charging cable on the Android emulator

ぃ、小莉子 提交于 2021-02-07 17:30:15

问题


How can I simulate the connection and the disconnection of the charging cable on the Android emulator?


回答1:


With the new emulator introduced in Android Studio 2.0 you can switch connection status easily on emulator extended controls.




回答2:


From : http://developer.android.com/tools/help/emulator.html#power

On command line call:

telnet localhost 5554

and then:

  power ac off
  power ac on


来源:https://stackoverflow.com/questions/32888848/simulate-the-connect-and-disconnect-of-the-charging-cable-on-the-android-emulato

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!