Search code examples
c#qr-codebarcodeavaloniauiavalonia

Avalonia Camera Barcode/QRCode Scanning


I'm developing a simple Inventory Management System app for a friend's shop.

I have to scan a barcode/QRCode (using the camera) to load/unload the product in stock.

I think the best way for barcode reading is using ZXing.Net. But I'm using the camera? Is there an easy way to do it?

I've been looking for a solution but I feel lost. I found Camera.MAUI solutions.. but I'm using Avalonia.

Any tips or useful links? Please help.


Solution

  • For merchant operations, you do not need any of that. You need a hardware barcode/QR reader device, which are cheap and available online (cca $20 give or take), they usually hook up to USB and act as a keyboard. Meaning when you scan an item, it "appears" as if someone typed in the barcode value on a keyboard. So, you organize your app that way. Either have an edit box to accept the code, or track keyboard entry until you recognize a full code.