listenToBarcodeData

abstract fun listenToBarcodeData(deviceId: String): Flow<BarcodeData>

Listens to the barcode data stream from a specific Opticon BLE scanner.

Use this method to receive barcode data from the scanner specified by the deviceId. You will get data as a flow of BarcodeData whenever a barcode is scanned.

Return

A flow of BarcodeData received from the scanner.

Parameters

deviceId

The identifier of the target scanner.


abstract fun listenToBarcodeData(deviceId: String, callback: Callback<BarcodeData>)

Callback-based version of listenToBarcodeData for Java interoperability.

Parameters

deviceId

The identifier of the target scanner.

callback

Callback to receive BarcodeData.