UIDevice.BatteryMonitoringEnabled 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.
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.