As far as i understand, there are 2 ways to read battery status:
1) Register a broadcast receiver on "ACTION_BATTERY_CHANGED"
and get the values from the Intent using BatteryManager
fields.
2) Read values directly from sysfs
battery files.
My question is which way is better? what are the pros/cons of each method?
Any help would be appreciated. Thanks!