hjam40 / Camera.MAUI

A CameraView Control for preview, take photos and control the camera options
MIT License
461 stars 77 forks source link

Barcode not shown up #152

Open KannanKrish opened 8 months ago

KannanKrish commented 8 months ago

Camara Maui version 1.5.1 QR Code not shown up.

Version 1,4,4 QR Code working fine.

bobwhitten commented 7 months ago

yeah, I see the same thing. I'm using this ONLY to display QR code. Rolled back to 1.4.4 and see the QR code.

mrijntjes commented 6 months ago

Camara Maui version 1.5.1 QR Code not shown up.

Same for me, and i also had to roll back to version 1.4.4 wat solved the problem for now.

melihercan commented 5 months ago

Same here; I can detect barcodes with <= 1.4.4. Can this library detect QR codes? It cannot detect this one, even with 1.4.4. WhatsApp Image 2024-06-17 at 20 35 59_8812a698

Android Scan QR code can detect the code even from this picture

mrijntjes commented 5 months ago

Yes, with 1.5.1 you can detect QR codes. But the configuration is a little bit different as in version 1.4.4. To use barcode detection with Camera.MAUI version 1.5.1 you also have to include the Camera.MAUI.ZXing Nuget package . Then in your sourcecode you have to specify the BarCodeDecoder property of your cameraview as shown in the screenshots and don't forget the Barcodeformat.QR code in PossibleFormats!

image image

melihercan commented 5 months ago

Hi @matthiasrijntjes, thanks for the response.
I followed the GitHub page instructions as you pointed out above, and all of the configurations are in place. But still, no joy.

I just wanted to ask you this. Camera.MAUI.Test from the master branch should work, right? I gave it a try, and neither a bar code nor a QR code was detected. I have tried both on Android and Windows.

mrijntjes commented 5 months ago

Hi @melihercan, i've not yet tested the original Camera.MAUI.Test which is currently based on .net 7.0. I've made a new sample repository for you, with a fresh sample based on .net 8.0 and tested on a Windows laptop with frontcamera. The repository is available at https://github.com/mrijntjes/CameraMaui151sample with a sample QR code inside issue 1 on https://github.com/mrijntjes/CameraMaui151sample/issues/1. If you still experience some problems then I suggest you to open or attribute to a new issue while this issue #152 was made for QRcode generating.

melihercan commented 5 months ago

@mrijntjes Thanks for the prompt response. I will give it a try tomorrow and report the results here. Thanks again.

melihercan commented 5 months ago

@mrijntjes I have tested the provided repo both on Android and Windows. Android works :) WhatsApp Image 2024-06-19 at 23 26 32_24dbe388 WhatsApp Image 2024-06-19 at 23 26 32_a5340716

melihercan commented 5 months ago

There is something wrong with the Windows settings. The following errors are observed: If you can fix it, this will be a great reference app for QR detection. Thanks for your hard work.

image image
mrijntjes commented 5 months ago

I'm happy to hear that you managed to scan the QR code successfully. The Windows configuration is OK (for reference, I started this repository on another PC to see if it works) but the error message you get refers to an Android component. What usually helps is to close Visual Studio, delete your project /bin and /obj folders completely, and reopen your project. Check if Debug and Windows Machine is selected and try again.