Very fewer people know this API. But, this is the awesome one.
It’s called Battery Status API.
It provides information about the system’s battery charge level.
- How about saving the contents of your blogs automatically when battery reaches less than 10%?
- Or How about informing users to remove plug or plug in the charger at certain percentage?
- Or turning off various functions when battery is low?
We can access this API with following method
There are even events like
which are fired and can be used.