Search code examples
androidbatterylevel

Significance of EXTRA_LEVEL in Android BatteryManager class


What does the value of EXTRA_LEVEL for the BatteryManager class in Android signify? I am trying to understand exactly what does a change of 1% in the level signify. For example for the Galaxy Nexus battery capacity is 1750 mAh. Does that mean, that a change of 1% would signify the flow of 17.5 mAh of electric charge?


Solution

  • What does the value of EXTRA_LEVEL for the BatteryManager class in Android signify?

    Quoting the documentation: "Extra for ACTION_BATTERY_CHANGED: integer field containing the current battery level, from 0 to EXTRA_SCALE."

    Does that mean, that a change of 1% would signify the flow of 17.5 mAh of electric charge?

    Not precisely, though it may be close. Batteries do not discharge linearly, for example. Device manufacturers are concerned with ensuring that the reported level is reasonably accurate in terms of indicating how much charge is available. They are not necessarily concerned with maintaining accuracy with respect to a battery capacity printed on a label on the side of the battery.