googlesamples / android-vision

Deprecated: The Mobile Vision API is now a part of ML Kit: Check out this repo:
https://github.com/firebase/quickstart-android/tree/master/mlkit
Apache License 2.0
2.93k stars 1.73k forks source link

QR Scanner is unable to scan for Specific device. #452

Open vaishali-dev opened 4 years ago

vaishali-dev commented 4 years ago

I've try QR scanner on many devices and it work without a problem, but when I tried it on another device, everything still runs fine except the QR scanner just won't recognise the QR Code although the camera is running and also there is a sufficient space in device. For this device barcodeDetector.isOperational() is returning false. I tried with github ML-kit demo https://github.com/firebase/mlkit-material-android .

Device that couldn't recognise QR Code: one Plus 7 OS: Android 10

agam-goyal commented 4 years ago

I am also facing the issue on Android 10.0 Getting following issues Barhopper: unsatisfied link error Also, sec_untrusted_app

artyomdeynega commented 4 years ago

We've faced this on Samsung S20 Ultra (Android 10). barcodeDetector.isOperational() returns false

moradi-morteza commented 4 years ago

according to this post in medium

The core barcode scanning functionality is a native library that the Mobile Vision API needs to download to the device (yuck). That is something we could work with, but it gets worse. The Mobile Vision library won’t even attempt to download the native library if the user’s device reports that it is “low” on memory. “Low” could mean that as much as 10% of the user’s storage space is still free. Just to rub salt in the wound, the library doesn’t provide good feedback to you the developer that this is happening. When I first ran the Mobile Vision sample app on a test device, I just saw a camera preview that did nothing. Even if Google offered proper feedback when it can’t download the library, this approach presents another issue. The user experience is terrible. How do we tell a user that they can’t scan barcodes until they delete some of their data? Users typically expect that apps come bundled with the core functionality ready to go. If I were using an app that presented me with this information, I would just uninstall it. Google does have an interesting method of making downloading the library viable. Google offers a manifest flag that tells Google Play Services to download the native library when a user installs your app. This means the library may be available before the user opens your app. Again, this won’t work if the device is “low” on storage space.