Results 1 - 12 of 12

BatteryManager.charging

A Boolean value indicating whether or not the device's battery is currently being charged.
API Battery API NeedsMarkupWork Property Reference Référence

BatteryManager.chargingTime

Indicates the amount of time, in seconds, that remain until the battery is fully charged.
API Battery API NeedsMarkupWork Property Reference Référence

BatteryManager.dischargingTime

Indicates the amount of time, in seconds, that remains until the battery is fully discharged.
API Battery API NeedsMarkupWork Property Reference Référence

BatteryManager.level

Indicates the current battery charge level as a value between 0.0 and 1.0.
API Battery API NeedsMarkupWork Property Reference Référence

BatteryManager

The BatteryManager interface provides ways to get information about the system's battery charge level.
API Battery API Device API Interface Reference Référence

BatteryManager.onchargingchange

Specifies an event listener to receive chargingchange events. These events occur when the battery charging state is updated.
API Battery API Event Handler NeedsMarkupWork Property Reference Référence

BatteryManager.onchargingtimechange

Specifies an event listener to receive chargingtimechange events. These events occur when the battery chargingTime is updated.
API Battery API Event Handler NeedsMarkupWork Property Reference Référence

BatteryManager.ondischargingtimechange

Specifies an event listener to receive dischargingtimechange events. These events occur when the battery dischargingTime is updated.
API Battery API Event Handler NeedsMarkupWork Property Reference Référence

BatteryManager.onlevelchange

Specifies an event listener to receive levelchange events. These events occur when the battery level is updated.
API Battery API Event Handler NeedsMarkupWork Property Reference Référence

Navigator.getBattery()

The getBattery() method provides information about the system's battery, returns a battery promise, which is resolved in a BatteryManager object providing also some new events you can handle to monitor the battery status.. This implements the Battery Status API; see that documentation for additional details, a guide to using the API, and sample code.
API Battery API Device API getBattery Method Navigator Reference

Battery Status API

The Battery Status API, more often referred to as the Battery API, provides information about the system's battery charge level and lets you be notified by events that are sent 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.
API Apps Battery Battery API Battery Status API Firefox OS Guide Mobile Overview