listenToBatteryStatus

abstract fun listenToBatteryStatus(deviceId: String): Flow<BatteryLevelStatus>

Listens to the battery status of a specific Opticon BLE scanner.

Use this method to get updates on the battery status of the scanner specified by the deviceId. The status will be provided as a flow of BatteryLevelStatus, indicating the current status details such as charging state and battery health.

Return

A flow of BatteryLevelStatus indicating the current battery status.

Parameters

deviceId

The identifier of the target scanner.


abstract fun listenToBatteryStatus(deviceId: String, callback: Callback<BatteryLevelStatus>)

Callback-based version of listenToBatteryStatus for Java interoperability.

Parameters

deviceId

The identifier of the target scanner.

callback

Callback to receive BatteryLevelStatus.