How to stop an android device from being charged programmatically?

后端 未结 9 701
醉酒成梦
醉酒成梦 2020-12-23 13:20

Is there an Android API for stop charging even though physically the charging is on?

9条回答
  •  野趣味
    野趣味 (楼主)
    2020-12-23 14:00

    I dont think there would be such an api. If it does exist it needs to be supported by the device manufacture as its not a pure OS lever feature. The same reason would make it a bad idea to use it as not all devices will support it.

    That being said it would be a bad idea to use/implement it , mobile devices are not built to directly run from the power supply and a user will not plug in the cable if he/she did not want to actually charge the device.

提交回复
热议问题