I looked everywhere for this, all I am getting is getting the battery related data via BatteryManager which I already know. But the thing is it always return battery health as "BATTERY_HEALTH_GOOD" . To cross check the same I checked various battery health apps available at Google play, many comments on those apps clearly says no matter how bad battery condition is(even the bulged up battery), it always says Health Good.

So, Is there any particular formula kind of thing which can be used to determine exactly how battery is doing and whether we should change it or not via android code?

Also, what does BatteryManager.BATTERY_HEALTH_COLD exactly mean?

1

There are 1 answers

2
Ankit Purwar On BEST ANSWER

After a lot of reading, finally found out the answer of my own question. Batteries used in mobile phones these days are of Li-ion technology and these batteries calculate life of battery on the basis of number of charge cycles.

Number charge cycles = number of times battery is charged from 0 to 100

This can also be calculated by dividing total amount of charge placed on battery by it's rated capacity(mAh capacity of battery)

Number charge cycles = cumulative charge / it's rated capacity

Battery number is inversely proportional to battery-health, the higher the battery number, lesser the battery-health. (If number is >= 400, battery is no longer usable and should be replaced).

NOTE: It is not possible to say with any certainty what the relative impact on battery health will be as a result of partial charge cycles vs. full charge cycles. Two batteries will have similar Battery Numbers if they have similar amounts of Aggregated Charge. But if those batteries had very different charging and discharging patterns, then comparing their Battery Numbers may not tell us anything useful about their relative health.

One thing we can say with certainty is that the health of a given battery will reduce as its computed Battery Number battery increases. Nonetheless, it is likely reasonable to assume that batteries with very high Battery Numbers are "less healthy" than batteries with very low Battery Numbers.*

Lastly, although our normal devices does not gives these numbers directly hence we need to depend on the Health-Status given by android OS for battery health but, some enterprise level devices (with smart and gifted batteries) provides these number for exact and better calculations.