AlIon
AlIon

Reputation: 367

How to make a UWP mobile QR code reader?

I have a UWP project and I should to make a simple QR code reader at one of the pages. It is mobile application. I have trying ZXing dll, but I have no idea how to use it, becouse there is very little information available for Windows 10. Can you help me to find a good solution? UPDATE There is code, I used, and it works

private MobileBarcodeScanner _scanner; 
private async void MainPage_Loaded(object sender, RoutedEventArgs e)
{
  _scanner = new MobileBarcodeScanner(this.Dispatcher);
  _scanner.UseCustomOverlay = false;
  _scanner.TopText = "Hold camera up to QR code";
  _scanner.BottomText = "Camera will automatically scan QR code";

  var result = await _scanner.Scan();
  ProcessScanResult(result);
}

Upvotes: 2

Views: 3444

Answers (2)

Mohamed Yamama
Mohamed Yamama

Reputation: 160

Try ZXing.Net 0.14.0.1, it has a Windows Runtime Component that is compatible with UWP. You can install the nuget package from here: http://www.nuget.org/packages/ZXing.Net and there's a code sample here http://zxingnet.codeplex.com/

Upvotes: 2

Igor Kulman
Igor Kulman

Reputation: 16361

I have a working sample for 8.1 located at https://github.com/igorkulman/QRReader.WPA81. It shows you how to use ZXing and the Nokia Imaging library to read QR codes. It should not be extra difficult to bring the code to UWP.

Upvotes: 0

Related Questions