Arman
Arman

Reputation: 55

How to get BATTERY_PROPERTY_CHARGE_COUNTER on api 21 Android

Why does getIntProperty return zero on the api device 21

val batteryManager = context.getSystemService(Context.BATTERY_SERVICE) as BatteryManager
val BatteryCapacity = batteryManager.getIntProperty(BatteryManager.BATTERY_PROPERTY_CHARGE_COUNTER)

Upvotes: 1

Views: 164

Answers (0)

Related Questions