Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Read a QR barcode with UWP - Windows 10

I need build a UWP app that can (phone/tablet) use the camera to read a QR barcode from a computer screen. I need to detect the QR barcode as camera is on as I don't want to take a screenshot (or similar) and save this to file and then read it. It needs to be detected at run-time.

Is there any MIT license code (in C#) I can use out there?

Many apps who use this functionality tend to have a "target" window which is not using the entire screen. How can I achieve this as well?

Can someone point me in the right direction as to how can I do this?

Many Thanks.

like image 478
Thierry Avatar asked Apr 04 '16 13:04

Thierry


1 Answers

After quite a bit of research, I eventually found a few articles that pointed me in the right direction.

This one is an interesting read: Mobile Barcode Scanning With Zxing.Net

This one provided me with the core of what I needed: Windows 8 – 8.1 QR Code reader – Definitive guide but used the class SoftwareBitmapLuminanceSource from Zxing.Net.Mobile.

And while I got the above to work as expected, I started to investigate ZXing.Net.Mobile and downloaded the full project. It supports various platforms including UWP.

It's taken me a while to get it up and running, but I eventually did and while their UWP app is crashing for most barcode reading scenarios, the Continuous Scanning does seem to work as expected and works extremely well and extremely fast.

Download the full project from here: ZXing.Net.Mobile

I'll continue investigating but this will get you started if you're in need of a QR reader for UWP.

Hope this will help others.

like image 130
Thierry Avatar answered Oct 04 '22 18:10

Thierry