How can I simulate the connection and the disconnection of the charging cable on the Android emulator?
With the new emulator introduced in Android Studio 2.0 you can switch connection status easily on emulator extended controls.
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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With