capawesome-team / capacitor-mlkit

⚡️ ML Kit plugins for Capacitor. Supports Android and iOS.
https://capawesome.io/plugins/mlkit/
Apache License 2.0
147 stars 46 forks source link

feat(barcode-scanning): add a `barcodesScanned` listener #192

Closed robingenz closed 1 month ago

robingenz commented 1 month ago

Plugin(s)

Current problem

Currently, the WebView is notified individually about each barcode found by the barcodeScanned listener, see: https://github.com/capawesome-team/capacitor-mlkit/blob/34bfb0873252ff3e283377b187a868aad1290092/packages/barcode-scanning/android/src/main/java/io/capawesome/capacitorjs/plugins/mlkit/barcodescanning/BarcodeScanner.java#L350

However, if there are several barcodes on an image, you may want to be notified immediately about all barcodes and not wait and check whether the barcodeScanned listener informs about different barcodes.

Preferred solution

There should be a barcodesScanned (note the extra s) listener that immediately informs about all barcodes found on an image.

Alternative options

No response

Additional context

No response

Before submitting