I get a "9" value from BatteryManager
. What does it mean? Can anyone know this?
Here is my code for what I want:
int health = batteryIntent.getIntExtra(BatteryManager.EXTRA_HEALTH, 0);
Research area.
As per documentation android use below constant.
enum {
BATTERY_STATUS_UNKNOWN = 1,
BATTERY_STATUS_CHARGING = 2,
BATTERY_STATUS_DISCHARGING = 3,
BATTERY_STATUS_NOT_CHARGING = 4,
BATTERY_STATUS_FULL = 5,
};
enum {
BATTERY_HEALTH_UNKNOWN = 1,
BATTERY_HEALTH_GOOD = 2,
BATTERY_HEALTH_OVERHEAT = 3,
BATTERY_HEALTH_DEAD = 4,
BATTERY_HEALTH_OVER_VOLTAGE = 5,
BATTERY_HEALTH_UNSPECIFIED_FAILURE = 6,
BATTERY_HEALTH_COLD = 7,
};
As per my research I did not see anywhere "9" value. This value not come always, rarely come, but I am not able to detect the case.