I am confused about the Battery Manager Parameters. can someone please explain below points:
BATTERY_PROPERTY_CHARGE_COUNTER -
Battery capacity in microampere-hours, as an integer.
Ques - Is it the remaining battery capacity or total battery Capacity. If its total , why does it change If its remaining( when i charged my phone 100% ) the values were somethign like 3366079 but total capcity of my phone's battery is 3300 mAh( read from power profile ) How can this be greater than 3300 mAh ?
Integer chargeCounter = mBatteryManager.getIntProperty(BatteryManager.BATTERY_PROPERTY_CHARGE_COUNTER);
Integer capacity = mBatteryManager.getIntProperty(BatteryManager.BATTERY_PROPERTY_CAPACITY);
Long energyCounter = mBatteryManager.getLongProperty(BatteryManager.BATTERY_PROPERTY_ENERGY_COUNTER);
long batteryCapacity = (chargeCounter/capacity) *100;
logs are as foolow :
Charge Counter: 3366079 capacity 100 Battery Capacity is :3366000
BATTERY_PROPERTY_ENERGY_COUNTER
Battery remaining energy in nanowatt-hours, as a long integer.
This parameter returns 0 ( tested on 2 devices ) Ques - Should this value be the remaining battery capacity value off 3300 mAH? or else what does this mean ?
Devices Used - LG G6 and Pixel 1
Thanks