Search code examples
androidnexus-6p

How to measure power consumption(mWh) on Nexus 6p?


Here's a link that chromium developer says that Nexus 6p has integrated power usage meter.

The measurement was done on a Nexus 6P, which has an integrated power usage meter.

How can I use it? Is there any standard android API?


Solution

  • Here is the API for the BatteryManager, which we use to do some power measuring on Nexus 6 phones. Specifically look at BATTERY_PROPERTY_ENERGY_COUNTER, BATTERY_PROPERTY_CHARGE_COUNTER, and BATTERY_PROPERTY_CURRENT_NOW. Have fun!