UIDevice.BatteryMonitoringEnabled UIDevice.BatteryMonitoringEnabled Property

Definition

Controls battery monitoring. When set, you can receive battery level change events.

[ObjCRuntime.Unavailable(ObjCRuntime.PlatformName.TvOS, ObjCRuntime.PlatformArchitecture.All, null)]
[get: Foundation.Export("isBatteryMonitoringEnabled")]
[get: ObjCRuntime.Unavailable(ObjCRuntime.PlatformName.TvOS, ObjCRuntime.PlatformArchitecture.All, null)]
[set: Foundation.Export("setBatteryMonitoringEnabled:")]
[set: ObjCRuntime.Unavailable(ObjCRuntime.PlatformName.TvOS, ObjCRuntime.PlatformArchitecture.All, null)]
public virtual bool BatteryMonitoringEnabled { get; set; }
member this.BatteryMonitoringEnabled : bool with get, set

Property Value

The default value is false.

Remarks

When set to the default value of false, applications cannot read the BatteryLevel, BatteryState, or receive battery-state change notifications (BatteryStateDidChangeNotification).

This can be used from a background thread.

Applies to