Share via


UIDevice.BatteryMonitoringEnabled Property

Definition

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

[ObjCRuntime.BindingImpl(ObjCRuntime.BindingImplOptions.GeneratedCode | ObjCRuntime.BindingImplOptions.Optimizable)]
public virtual bool BatteryMonitoringEnabled { [Foundation.Export("isBatteryMonitoringEnabled")] get; [Foundation.Export("setBatteryMonitoringEnabled:")] set; }
[<ObjCRuntime.BindingImpl(ObjCRuntime.BindingImplOptions.GeneratedCode | ObjCRuntime.BindingImplOptions.Optimizable)>]
[<get: Foundation.Export("isBatteryMonitoringEnabled")>]
[<set: Foundation.Export("setBatteryMonitoringEnabled:")>]
member this.BatteryMonitoringEnabled : bool with get, set

Property Value

The default value is false.

Attributes

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