ArcGIS for Developers

Battery QML Type

(BETA) Reads system battery information, including battery level and charging source. More...

Import Statement: import ArcGIS.AppFramework.Platform 1.0

Properties

Detailed Description

Enumerations

BatteryState enumeration

Enum describing the current charge state of the battery. Informs the state property.

NameValue
Battery.BatteryStateUnknown0
Battery.BatteryStateNotCharging1
Battery.BatteryStateDischarging2
Battery.BatteryStateCharging3
Battery.BatteryStateFull4

PowerSource enumeration

Enum describing the device's currently-used power source. Informs the source property.

NameValue
Battery.PowerSourceUnknown0
Battery.PowerSourceAC1
Battery.PowerSourceUSB2
Battery.PowerSourceWireless3
Battery.PowerSourceBattery4

PowerMode enumeration

Enum describing the power consumption mode that the device is curently using. Informs the mode property.

NameValue
Battery.PowerModeUnknown0
Battery.PowerModeBalanced1
Battery.PowerModeBatterySaver2

Property Documentation

[read-only] level : int

The current percentage of power remaining for the device's battery.

On Windows, this will return 0 if the device is currently connected to an external power source.


[read-only] mode : PowerMode

The current power consumption mode the device is in. Informed by the PowerMode enum.


[read-only] source : PowerSource

Contains the power source that the device is currently using. Informed by the PowerSource enum.


[read-only] state : BatteryState

Contains the battery's current charging state. Informed by the BatteryState enum.