Thanks to visit codestin.com
Credit goes to simpl.info

simpl.info Battery API

You can inspect the BatteryManager object from the console.

View source on GitHub