IPowerManager

Namespace: XPlat.Device.Power

Provides access to information about a device's battery and power supply status.

public interface IPowerManager

Supported platforms

Platform

Version

.NET Standard

1.4

Xamarin.Android

8.1

Xamarin.iOS

1.0

UWP

10.0

Properties

BatteryStatus

Gets the device's battery status.

BatteryStatus BatteryStatus { get; }

RemainingChargePercent

Gets the total percentage of charge remaining from all batteries connected to the device.

int RemainingChargePercent { get; }

Events

BatteryStatusChanged

Occurs when BatteryStatus changes.

event EventHandler<BatteryStatus> BatteryStatusChanged;

RemainingChargePercentChanged

Occurs when RemainingChargePercent changes.

event EventHandler<int> RemainingChargePercentChanged;