Skip to content

BatteryProbe

Collects battery information (charging state and battery level) on a regular basis as specified by the IntervalSamplingConfiguration.interval.

Only reports a BatteryState when it differs from the previous one.

Inheritance

Constructors

BatteryProbe

BatteryProbe()

Methods

getMeasurement

Future<Measurement?> getMeasurement()
override

Collects the Measurement. Implemented by subclasses.

Can return null if no data is available. Can return an Error measurement if an error occurs.