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
```csharp
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);
};
```


###Features
- 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:

```csharp
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:

```csharp
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.

Dependencies

This package has no dependencies.

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

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

Version History

Version Downloads Last updated
2.4.1 271,365 4/4/2018
2.4.0-beta1 1,574 3/14/2018
2.3.2 166,717 10/25/2017
2.3.1 9,074 10/25/2017
2.2.9 173,095 4/14/2017
2.2.8 2,049 4/14/2017
2.2.6 842 4/14/2017
2.2.5 580 4/14/2017
2.2.0 2,278 4/12/2017
2.1.47 130,797 8/24/2016
2.1.46 1,615 8/24/2016
2.1.45 5,972 8/23/2016
2.1.44 2,740 8/17/2016
2.1.43 442 8/17/2016
2.1.13 12,108 7/19/2016
2.1.12 25,861 7/19/2016
2.1.10-beta 380 7/19/2016
2.1.0-beta1 8,696 4/18/2016
2.0.4.46 37,457 2/9/2016
2.0.4.24 19,484 1/18/2016
2.0.4.23 500 1/18/2016
2.0.4.19 939 1/13/2016
2.0.4.18 422 1/13/2016
2.0.4.17 10,673 1/13/2016
2.0.3.1 3,178 12/18/2015
2.0.3 521 12/18/2015
2.0.2 424 12/18/2015
2.0.1 721 12/15/2015
2.0.0 988 12/15/2015
1.5.4 6,606 11/12/2015
1.5.3 798 11/10/2015
1.5.2 389 11/10/2015
1.5.1 8,920 7/31/2015
1.5.0 810 7/30/2015
1.4.7.1 14,177 1/12/2015
1.4.7 1,536 12/9/2014
1.4.6 4,707 8/5/2014
1.4.5 920 7/3/2014
1.4.5-beta 468 4/14/2014
1.4.2.1 1,412 1/29/2014
1.4.2 647 1/29/2014
Show less