Edit

Share via


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)]
public virtual bool BatteryMonitoringEnabled { [Foundation.Export("isBatteryMonitoringEnabled")] [ObjCRuntime.Unavailable(ObjCRuntime.PlatformName.TvOS, ObjCRuntime.PlatformArchitecture.All, null)] get; [Foundation.Export("setBatteryMonitoringEnabled:")] [ObjCRuntime.Unavailable(ObjCRuntime.PlatformName.TvOS, ObjCRuntime.PlatformArchitecture.All, null)] set; }
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