I'm trying to implement a QR code scanner in my app using Mlkit and following these two links :
https://medium.com/codex/scan-barcodes-in-android-using-the-ml-kit-30b2a03ccd50
https://developers.google.com/ml-kit/vision/barcode-scanning/android
Mlkit and CameraX versions :
camerax_version = "1.1.0-beta03" / barcodeScanning = "17.0.2"
It works fine on any Samsung device, but on Xiaomi mi 9T pro with Android 10 it takes between 2 and 10 secondes to scan a simple QR code. On Pixel 2 with Android 11 it sometimes never work or takes up to 20 secondes to work.
When I use the following lib it works fine on every device :
Android zxing Embedded BarcodeView not resuming
Why does Mlkit take so long (or don't work) to scan some simple QR code on some device ?
Thanks for the response