Battery Status API
Last updated
Last updated
Battery Status API provides information about the device's battery charge level and notifies you when the battery level or charging status change.
This can be used to adjust your app's resource usage to reduce battery drain when the battery is low, or to save changes before the battery runs out in order to prevent data loss.
You can refer to the code present in /partials/web-apis/battery-status.html
file and use it accordingly.