Android: difference between BATTERY_STATUS_DISCHARGING and BATTERY_STATUS_NOT_CHARGING

I want to know the difference between two flags

BatteryManager.BATTERY_STATUS_DISCHARGING 

and

 BatteryManager.BATTERY_STATUS_NOT_CHARGING 

I developed an application that uses these two flags, and I expected to see "discharge" when I disconnected the phone from the charger, but instead it just says "does not charge."

What is the difference between the two?

+7
source share
2 answers

from: Battery low. Not enough charging current ... Is there any intention before this message appears?

Some devices (tablets?) Consume more power than what can be provided through a USB port.

+5
source

I cannot find a clear definition of these two in the Android API or elsewhere on the Internet.

My best guess is that BATTERY_STATUS_DISCHARGING indicates that the device is actively discharging power, and BATTERY_STATUS_NOT_CHARGING indicates that the device is connected but does not receive enough power to actually charge - for example, if it is connected to a low-power USB port.

However, there are other reports from developers that some devices never return BATTERY_STATUS_DISCHARGING , even if they are completely disabled: https://groups.google.com/a/chromium.org/forum/#!topic/chromium-reviews/ 1AjyPYt0tQs

In particular, Nexus 7 2013 seems to have this error (confirmed by personal experience): https://code.google.com/p/android/issues/detail?id=124768 .

Presumably, you encountered a similar error.

+1
source

All Articles