Battery status
Limited availability
The navigator.getBattery()
API obtains information about the device's battery, including charge level and status. Also known as the Battery API.
To learn more, see
BatteryManager,
BatteryManager: charging property,
BatteryManager: chargingTime property,
BatteryManager: chargingchange event,
BatteryManager: chargingtimechange event,
BatteryManager: dischargingTime property,
BatteryManager: dischargingtimechange event,
BatteryManager: level property,
BatteryManager: levelchange event,
Navigator: getBattery() method at MDN.
Compatibility (view on caniuse.com)
- Chrome 38 Released on 2014-10-07
- Chrome Android 38 Released on 2014-10-08
- Edge 79 Released on 2020-01-15
- Firefox ❌ Search for bugs Search for standards position
- Firefox for Android ❌ Search for bugs Search for standards position
- Safari ❌ Search for bugs Search for standards position
- Safari on iOS ❌ Search for bugs Search for standards position
Specifications
- Battery Status API, from Devices and Sensors Working Group (W3C).