Barcode Scanner for Xamarin.iOS, Xamarin.Android, UWP and Tizen
Alternatives To Zxing.net.mobile
Project NameStarsDownloadsRepos Using ThisPackages Using ThisMost Recent CommitTotal ReleasesLatest ReleaseOpen IssuesLicenseLanguage
Zxing Android Embedded5,464
2 months ago6October 25, 2021106apache-2.0Java
Barcode scanner library for Android, based on the ZXing decoder
Barcodescanner5,23353 years ago27August 19, 2017otherJava
Barcode Scanner Libraries for Android
Html5 Qrcode3,7233411 days ago62April 15, 2023275apache-2.0TypeScript
A cross platform HTML5 QR code reader. See end to end implementation at: https://scanapp.org
1103 years ago5October 22, 2018148mitObjective-C
A barcode and qr code scanner (二维码、扫码、扫一扫、ZXing、ZBar、iOS系统AVFoundation扫码封装,扫码界面效果封装)
15 days ago7April 15, 202315apache-2.0Java
🔥 ZXing的精简极速版,优化扫码和生成二维码/条形码,内置闪光灯等功能。扫描风格支持:微信的线条样式,支付宝的网格样式。几句代码轻松拥有扫码功能 ,ZXingLite让集成更简单。(扫码识别速度快如微信)
React Native Camera Kit2,14846199 days ago195August 10, 202381mitSwift
A high performance, easy to use, rock solid camera library for React Native apps.
React Native Qrcode Scanner1,986171234 months ago51February 11, 2022123mitJavaScript
A QR code scanner component for React Native.
Qrcodereaderview1,77023114 years ago2March 29, 201749Java
Modification of ZXING Barcode Scanner project for easy Android QR-Code detection and AR purposes
333 months ago16March 11, 201825otherSwift
:mag_right: A simple and beautiful barcode scanner.
28a year ago21July 16, 20225apache-2.0Objective-C
The easy to use bar code and QR code scan library for iOS【支持二维码生成、图片中读取二维码、条形码和二维码扫描】
Alternatives To Zxing.net.mobile
Select To Compare

Alternative Project Comparisons


Join the chat at https://gitter.im/Redth/ZXing.Net.Mobile

ZXing.Net.Mobile Logo

ZXing.Net.Mobile is a C#/.NET library based on the open source Barcode Library: ZXing (Zebra Crossing), using the ZXing.Net Port. It works with Xamarin.iOS, Xamarin.Android, Tizen, and UWP. The goal of ZXing.Net.Mobile is to make scanning barcodes as effortless and painless as possible in your own applications.

Build Status NuGet NuGet


The simplest example of using ZXing.Net.Mobile looks something like this:

buttonScan.Click += (sender, e) => {

	#if __ANDROID__
	// Initialize the scanner first so it can track the current context
	MobileBarcodeScanner.Initialize (Application);
	var scanner = new ZXing.Mobile.MobileBarcodeScanner();

	var result = await scanner.Scan();

	if (result != null)
		Console.WriteLine("Scanned Barcode: " + result.Text);

Xamarin Forms

For Xamarin Forms there is a bit more setup needed. You will need to initialize the library on each platform in your platform specific app project.


On Android, in your main Activity's OnCreate (..) implementation, call:


ZXing.Net.Mobile for Xamarin.Forms also handles the new Android permission request model for you via Xamarin.Essentials, but you will need to add the following override implementation to your main Activity as well:

public override void OnRequestPermissionsResult(int requestCode, string[] permissions, Permission[] grantResults)
    Xamarin.Essentials.Platform.OnRequestPermissionsResult(requestCode, permissions, grantResults);
    base.OnRequestPermissionsResult(requestCode, permissions, grantResults);

The Camera permission should be automatically included for you in the AndroidManifest.xml however if you would like to use the Flashlight API you will still need to add the Flashlight permission yourself. You can do this by using the following assembly level attribute:

[assembly: UsesPermission (Android.Manifest.Permission.Flashlight)]

In your AppDelegate's FinishedLaunching (..) implementation, call:

Windows Universal UWP

In your main Page's constructor, you should add:


If you notice that finishing scanning or pressing the back button is causing your Page to jump back further than you'd like, or if you're having trouble updating the UI of a Page after scanning is completed, you may need to set NavigationCacheMode="Enabled" within your Page's XAML <Page ... /> element.


In your AppDelegate's FinishedLaunching (..) implementation, call:



  • Xamarin.iOS
  • Xamarin.Android
  • Tizen
  • UWP
  • Xamarin.Mac (rendering only, not scanning)
  • Simple API - Scan in as little as 2 lines of code!
  • Scanner as a View - UIView (iOS) / Fragment (Android) / Control (WP)

Custom Overlays

By default, ZXing.Net.Mobile provides a very simple overlay for your barcode scanning interface. This overlay consists of a horizontal red line centered in the scanning 'window' and semi-transparent borders on the top and bottom of the non-scanning area. You also have the opportunity to customize the top and bottom text that appears in this overlay.

If you want to customize the overlay, you must create your own View for each platform. You can customize your overlay like this:

var scanner = new ZXing.Mobile.MobileBarcodeScanner();
scanner.UseCustomOverlay = true;
scanner.CustomOverlay = myCustomOverlayInstance;
var result = await scanner.Scan();
//Handle result

Keep in mind that when using a Custom Overlay, you are responsible for the entire overlay (you cannot mix and match custom elements with the default overlay). The ZxingScanner instance has a CustomOverlay property, however on each platform this property is of a different type:

  • Xamarin.iOS => UIView
  • Xamarin.Android => View
  • UWP => UIElement

All of the platform samples have examples of custom overlays.

Barcode Formats

By default, all barcode formats are monitored while scanning. You can change which formats to check for by passing a ZxingScanningOptions instance into the StartScanning method:

//NOTE: On Android you should call the initialize method with an application instance
#if __ANDROID__
// Initialize the scanner first so it can track the current context
MobileBarcodeScanner.Initialize (Application);

var options = new ZXing.Mobile.MobileBarcodeScanningOptions();
options.PossibleFormats = new List<ZXing.BarcodeFormat>() { 
    ZXing.BarcodeFormat.Ean8, ZXing.BarcodeFormat.Ean13 

var scanner = new ZXing.Mobile.MobileBarcodeScanner(); 
var result = await scanner.Scan(options);
//Handle result


There is a sample for each platform including examples of how to use custom overlays.

Using the ZXingScanner View / Fragment / Control

On each platform, the ZXing scanner has been implemented as a reusable component (view, fragment, or control), and it is possible to use the reusable component directly without using the MobileBarcodeScanner class at all. On each platform, the instance of the view/fragment/control contains the necessary properties and methods required to control your scanner. By default, the default overlay is automatically used, unless you set the CustomOverlay property as well as the UseCustomOverlay property on the instance of the view/fragment/control. You can use methods such as ToggleTorch() or StopScanning() on the view/fragment/control, however you are responsible for calling StartScanning(...) with a callback and an instance of MobileBarcodeScanningOptions when you are ready for the view's scanning to begin. You are also responsible for stopping scanning if you want to cancel at any point.

The view/fragment/control classes for each platform are:

  • iOS: ZXingScannerView (UIView) - See ZXingScannerViewController.cs View Controller for an example of how to use this view
  • iOS: AVCaptureScannerView (UIView) - This is API equivalent to ZXingScannerView, but uses Apple's AVCaptureSession Metadata engine to scan the barcodes instead of ZXing.Net. See AVCaptureScannerViewController.cs View Controller for an example of how to use this view
  • Android: ZXingScannerFragment (Fragment) - See ZXingActivity.cs Activity for an example of how to use this fragment
  • UWP: ZXingScannerControl (UserControl) - See ScanPage.xaml Page for an example of how to use this Control

Using Apple's AVCaptureSession (iOS7 Built in) Barcode Scanning

In iOS7, Apple added some API's to allow for scanning of barcodes in an AVCaptureSession. The latest version of ZXing.Net.Mobile gives you the option of using this instead of the ZXing scanning engine. You can use the AVCaptureScannerView or the AVCaptureScannerViewController classes directly just the same as you would use their ZXing* equivalents. Or, in your MobileBarcodeScanner, there is now an overload to use the AV Capture Engine:

//Scan(MobileBarcodeScanningOptions options, bool useAVCaptureEngine)
scanner.Scan(options, true);

In the MobileBarcodeScanner, even if you specify to use the AVCaptureSession scanning, it will gracefully degrade to using ZXing if the device doesn't support this (eg: if it's not iOS7 or newer), or if you specify a barcode format in your scanning options which the AVCaptureSession does not support for detection. The AVCaptureSession can only decode the following barcodes:

  • Aztec
  • Code 128
  • Code 39
  • Code 93
  • EAN13
  • EAN8
  • PDF417
  • QR
  • UPC-E


ZXing.Net.Mobile is a combination of a lot of peoples' work that I've put together (including my own). So naturally, I'd like to thank everyone who's helped out in any way. Those of you I know have helped I'm listing here, but anyone else that was involved, please let me know!


Apache ZXing.Net.Mobile Copyright 2012 The Apache Software Foundation This product includes software developed at The Apache Software Foundation (http://www.apache.org/).


ZXing.Net is released under the Apache 2.0 license. ZXing.Net can be found here: https://github.com/micjahn/ZXing.Net A copy of the Apache 2.0 license can be found here: https://github.com/micjahn/ZXing.Net/blob/master/COPYING


ZXing is released under the Apache 2.0 license. ZXing can be found here: http://code.google.com/p/zxing/ A copy of the Apache 2.0 license can be found here: https://github.com/zxing/zxing/blob/master/LICENSE


The System.Drawing classes included are from the mono source code which is property of Novell. Copyright notice is intact in source code files.

Popular Scanner Projects
Popular Barcode Projects
Popular Security Categories
Related Searches

Get A Weekly Email With Trending Projects For These Categories
No Spam. Unsubscribe easily at any time.
C Sharp