UIDevice.BatteryState Property
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Current battery state if monitoring is enabled.
[ObjCRuntime.Unavailable(ObjCRuntime.PlatformName.TvOS, ObjCRuntime.PlatformArchitecture.All, null)]
public virtual UIKit.UIDeviceBatteryState BatteryState { [Foundation.Export("batteryState")] [ObjCRuntime.Unavailable(ObjCRuntime.PlatformName.TvOS, ObjCRuntime.PlatformArchitecture.All, null)] get; }
member this.BatteryState : UIKit.UIDeviceBatteryState
Property Value
Battery state if battery monitoring is enabled, otherwise Unknown.
- Attributes
Remarks
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.