BatteryManager Health values "9"
Asked Answered
C

0

6

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.

BatteryManager Health values

BatteryStats.Java

BatteryManager.java

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.

Crematory answered 8/1, 2019 at 5:44 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.