Share via


IBattery Interface

Definition

Methods and properties for battery and charging information of the device.

public interface class IBattery
public interface IBattery
type IBattery = interface
Public Interface IBattery

Remarks

Platform specific remarks:

- Android: Battery_Stats permission must be set in manifest.

- iOS: Simulator will not return battery information, must be run on device.

- Windows: None.

Properties

ChargeLevel

Gets the current charge level of the device from 0.0 to 1.0.

EnergySaverStatus

Gets the current energy saver status of the device.

PowerSource

Gets the current power source for the device.

State

Gets the charging state of the device.

Events

BatteryInfoChanged

Occurs when battery properties change.

EnergySaverStatusChanged

Occurs when the energy saver status changes.

Applies to