How to stop an android device from being charged programmatically?

后端 未结 9 697
醉酒成梦
醉酒成梦 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:19

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

    AFAIK no.

    Justification:

    android.intent.action.BATTERY_CHANGED is a protected intent that can only be sent by the system. Therefore you cannot duplicate or override the functionality.

提交回复
热议问题