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