UIDevice.BatteryState Property


Current battery state if monitoring is enabled.

[ObjCRuntime.Unavailable(ObjCRuntime.PlatformName.TvOS, ObjCRuntime.PlatformArchitecture.All, null)]
[get: Foundation.Export("batteryState")]
[get: ObjCRuntime.Unavailable(ObjCRuntime.PlatformName.TvOS, ObjCRuntime.PlatformArchitecture.All, null)]
public virtual UIKit.UIDeviceBatteryState BatteryState { get; }
member this.BatteryState : UIKit.UIDeviceBatteryState

Property Value

Battery state if battery monitoring is enabled, otherwise Unknown.



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

This can be used from a background thread.

Applies to