ZXing.Net.Mobile 1.4.5-beta

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, and Windows Phone. The goal of ZXing.Net.Mobile is to make scanning barcodes as effortless and painless as possible in your own applications!

GitHub Project: https://github.com/Redth/ZXing.Net.Mobile

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

 //NOTE: On Android, you MUST pass a Context into the Constructor!
var scanner = new ZXing.Mobile.MobileBarcodeScanner();
var result = await scanner.Scan();
 if (result != null)
   Console.WriteLine("Scanned Barcode: " + result.Text);

- Xamarin.iOS
- Xamarin.Android
- Windows Phone
- 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**
- Windows Phone => **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:

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

###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
- Android: ZXingScannerFragment (Fragment) - See ZXingActivity.cs Activity for an example of how to use this fragment
- Windows Phone: ZXingScannerControl (UserControl) - See ScanPage.xaml Page for an example of how to use this Control

###Using Apple's AVCaptureS

This is a prerelease version of ZXing.Net.Mobile.
There is a newer version of this package available.
See the version list below for details.
Install-Package ZXing.Net.Mobile -Version 1.4.5-beta
dotnet add package ZXing.Net.Mobile --version 1.4.5-beta
<PackageReference Include="ZXing.Net.Mobile" Version="1.4.5-beta" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add ZXing.Net.Mobile --version 1.4.5-beta
The NuGet Team does not provide support for this client. Please contact its maintainers for support.


This package has no dependencies.

Showing the top 4 GitHub repositories that depend on ZXing.Net.Mobile:

Repository Stars
Render After Effects animations natively on Android, iOS, MacOS and TvOS for Xamarin
Pre-build conference application built with Xamarin
Connect tiny devices to Microsoft Azure services to build IoT solutions
Samples for the Urho bindings

Read more about the GitHub Usage information on our documentation.

Version History

Version Downloads Last updated
2.4.1 435,774 4/4/2018
2.4.0-beta1 1,699 3/14/2018
2.3.2 203,372 10/25/2017
2.3.1 13,966 10/25/2017
2.2.9 187,171 4/14/2017
2.2.8 2,372 4/14/2017
2.2.6 952 4/14/2017
2.2.5 712 4/14/2017
2.2.0 2,619 4/12/2017
2.1.47 138,085 8/24/2016
2.1.46 1,702 8/24/2016
2.1.45 6,163 8/23/2016
2.1.44 2,837 8/17/2016
2.1.43 505 8/17/2016
2.1.13 12,722 7/19/2016
2.1.12 26,747 7/19/2016
2.1.10-beta 428 7/19/2016
2.1.0-beta1 8,796 4/18/2016 40,345 2/9/2016 40,638 1/18/2016 552 1/18/2016 998 1/13/2016 488 1/13/2016 13,009 1/13/2016 3,254 12/18/2015
2.0.3 591 12/18/2015
2.0.2 482 12/18/2015
2.0.1 791 12/15/2015
2.0.0 1,116 12/15/2015
1.5.4 7,350 11/12/2015
1.5.3 895 11/10/2015
1.5.2 445 11/10/2015
1.5.1 9,778 7/31/2015
1.5.0 905 7/30/2015 14,975 1/12/2015
1.4.7 1,626 12/9/2014
1.4.6 4,845 8/5/2014
1.4.5 979 7/3/2014
1.4.5-beta 518 4/14/2014 1,474 1/29/2014
1.4.2 730 1/29/2014
Show less