How can I limit barcode scanner to once?
I try to code a barcode scanner with Jetpack Compose and Google ML Kit. I use ImageAnalysis with the STRATEGY_KEEP_ONLY_LATEST and call a class BarCodeAnalyzer who initialize and create the barcodeScanner.
But when I scan a barcode, my code detect two time the same barcode and open two screens.
So how can I pause scan ? Or stop the imageAnalysis when I found a barcode ?
AndroidView
AndroidView(
factory = { context ->
val previewView = PreviewView(context)
val preview =...