Battery tracking control methods. The implementation can turn battery tracking on and off by changing UIDevice.isBatteryMonitoringEnabled.
Methods
func startBatteryMonitoring()
Starts battery status tracking by setting UIDevice.current.isBatteryMonitoringEnabled to true. If UIDevice.current.isBatteryMonitoringEnabled is already true, changing the status is not necessary. If enabling tracking is undesirable, the implementation can be empty.
func stopBatteryMonitoring()
Disables battery status tracking by setting UIDevice.current.isBatteryMonitoringEnabled to true. If UIDevice.current.isBatteryMonitoringEnabled is already false, changing the status is not necessary. If battery tracking must be continued, the value of isBatteryMonitoringEnabled can be left unchanged.