UIKit.UIDevice.BatteryState Property
Current battery state if monitoring is enabled.

Syntax

[get: Foundation.Export("batteryState")]
public virtual UIDeviceBatteryState BatteryState { get; }

Value

Battery state if battery monitoring is enabled, otherwise UIDeviceBatteryState.Unknown.

Remarks

By default, UIDevice.BatteryMonitoringEnabled is false. In that situation, UIDevice.BatteryState will be UIDeviceBatteryState.Unknown (and UIDevice.BatteryLevel will be -1).

This can be used from a background thread.

Requirements

Namespace: UIKit
Assembly: Xamarin.iOS (in Xamarin.iOS.dll)
Assembly Versions: 0.0.0.0