Open rizmaulana opened 1 year ago
Hi @yuriy-budiyev i start use this library to scan many kind of qr and barcode, but when it come to Jetpack Compose, I have a trouble : the camera is too dark.
I try to build from https://github.com/yuriy-budiyev/lib-demo-app everything looks good, so I assume is the problem is not related to the android device
Here is my code :
@Composable private fun CameraView( qrCodeReturn: (String) -> Unit ) { Box(Modifier.fillMaxSize()) { AndroidView( modifier = Modifier, factory = { CodeScannerView(it).apply { val codeScanner = CodeScanner(it, this).apply { isAutoFocusEnabled = true isAutoFocusButtonVisible = false scanMode = ScanMode.SINGLE decodeCallback = DecodeCallback { result -> qrCodeReturn.invoke(result.text) releaseResources() } errorCallback = ErrorCallback { releaseResources() } } codeScanner.startPreview() } }, ) } }
TIA
Hi @yuriy-budiyev i start use this library to scan many kind of qr and barcode, but when it come to Jetpack Compose, I have a trouble : the camera is too dark.
I try to build from https://github.com/yuriy-budiyev/lib-demo-app everything looks good, so I assume is the problem is not related to the android device
Here is my code :
TIA