How to get battery remaining energy in nanowatt-hours?

528 views Asked by At

How can I get battery remaining energy in nanowatt-hours, average battery current in micro amperes and so on from BatteryManager on android versions lower than 5.0? Because constants like BATTERY_PROPERTY_ENERGY_COUNTER,BATTERY_PROPERTY_CURRENT_AVERAGE was added only from API 21. I looked in BatteryManager public int getIntProperty (int id) and found native classes, so I do not know how to use them.

0

There are 0 answers