-
Notifications
You must be signed in to change notification settings - Fork 151
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
QR code Scanning doesn't work on some android phones #200
Comments
After doing some debugging in ZXing.Net.Maui we have discovered that on the phones that don't work a camera frame is being retrieved and sent to ZXing.Net which is returning null on the line:
I suspect that there is something wrong with the luminance data. I have managed to dump the raw data from PixelBufferHolder.Data from working and not working phones. Interestingly the data on the phone that isn't working is significantly larger, 491 kB instead of 307 kB . Given that both should be 640x480 then they should be exactly the same size. I've attached the raw YUV data from both the working and the not working phones. |
Hi @trampster! Do you find any workaround for this issue? |
No, we have just finished switching to BarcodeScanning.Native.Maui. It uses native scanning on each platform, and it works on all the android and iPhones we have tested on so far, including the ones that fail with ZXing.Net.Maui. |
Hi, Using platform decoders does not work for Amazon devices. |
Have you tried BarcodeScanning.Native.Maui on amazon devices, it doesn't require Google Play Services (I've tested with it disabled, as it bundles the code with your app). But I don't have access to an amazon device. We have also found BarcodeScanning.Native.Maui to be a lot faster, if you look at the logs while ZXing.Net.Maui is running it causes a Garbage collection every few seconds because of the massive amounts of memory allocations it does for every single frame, I see that your merge request adds even more memory allocations. |
I didn't try BarcodeScanning.Native.Maui but for several years I use my own solution based on Now I believe that MLKit will not work too on Amazon devices. Here is an indirect confirmation (maybe in the future I will try to get direct confirmation, but now I don't have enough time) In my merge request tempBuffer allocated only once (if need) and reused in the next frames without any GC triggering. |
QR code scanning doesn't work on the following android phones:
The camera view shows but it never detects the QR code.
The preloaded camera app on these phones can scan these code successfully. And the same QR code can be scanned by ZXing.Net.Maui on other android and iOS phone models.
I have attached logs from trying to scan with the Oppo A54. There are logs from when the scan page is loaded but there is nothing apart from GC collection stats while its actually trying to scan.
OPPO A54 QR code scan logs.txt
We are using:
The text was updated successfully, but these errors were encountered: