How to get battery stats in the real time. Part 2.

Hello Everybody,

Lets talk today about how to get battery stats in the real time! 🙂

Sample activity:


Idea: recieve and handle Intent.ACTION_BATTERY_CHANGED.

By this way we are able to get a lot of information about the battery health.

You can discover BatteryManager.* constants to check what additional info you are able to retrieve.

Happy charging and disharging! (:

Related topic, how to get battery stats via shell

Best regards,
Yahor