Instance Property

batteryMonitoringEnabled

A Boolean value indicating whether battery monitoring is enabled (YES) or not (NO).

Declaration

@property(nonatomic, getter=isBatteryMonitoringEnabled) BOOL batteryMonitoringEnabled;

Discussion

Enable battery monitoring if your app needs to be notified of changes to the battery state, or if you want to check the battery charge level.

The default value of this property is NO, which:

  • Disables the posting of battery-related notifications

  • Disables the ability to read battery charge level and battery state

See Also

Getting the Device Battery State

batteryLevel

The battery charge level for the device.

batteryState

The battery state for the device.

UIDeviceBatteryState

The battery power state of the device.