-
Notifications
You must be signed in to change notification settings - Fork 160
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
Compatibility with some Android smart-phones #107
Comments
@gyaccuzzi hey, it seems you have mashed both a bug report and a solution together into the same issue. I guess you could separate the bug from the solution by proposing the above code as a PR, and then give more details about this:
As in, what does "fails" mean exactly? An exception thrown? Please paste the whole exception ( |
Hi, there's not an exception, the issue is in some models of smart-phones ImageAnalysis send the imagen in YUV format but with another standard, so when you analize the image the QR is not found because the image is malformed. A solution that I found was to convert YUV to RGB, surely you can found another better solution with less processing. This happened with two differente models, samsung and motorola. |
Interesting, thanks for sharing. |
… und wahrscheinlich auch anderen Geräten auszugeleichen Lösung von Github siehe: Redth#107
It happens with Xiaomi phones as well. That's all very unfortunate, as I'm having difficulties converting my existing apps to Maui. |
Hi @gyaccuzzi. It seems to be working ok! And your answer is somehow hidden in a third page of open issues. I hope more devs can reach here. Thanks! |
@sbricchi can you propose a PR so that we all benefit from this fix? |
I think, I need to do more testing. Also, as @gyaccuzzi mentioned, i'm not sure it's the FINAL solution for this issue. |
reference: Redth#107
Hi all, Thanks to @sbricchi & @gyaccuzzi for the work ! I suggest this additional code in order to get a good detection : 1- Add a constructor to handle orientation change :
2- Update camera on orientation change :
3- Unregister event in Dispose :
4- Configure camera preview with the same settings of the image analyzer :
Tested on many Android phones/tablets including Samsung A23. Regards. |
@Eskissimo can you post your review in the PR please, not here :) |
Here a solution to give compatibility to some models of smart-phones with Android. The problem is these modelos (like samsung A23) reports YUV format with another structure, so the processing of the picture fails. To solve it I had to change it to RGBA format and to apply a convertion:
And into "public BarcodeResult[] Decode(PixelBufferHolder image)"
Here the function
The text was updated successfully, but these errors were encountered: