RedCorners.Forms.ZXing 8.47.3

There is a newer version of this package available.
See the version list below for details.
dotnet add package RedCorners.Forms.ZXing --version 8.47.3
NuGet\Install-Package RedCorners.Forms.ZXing -Version 8.47.3
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="RedCorners.Forms.ZXing" Version="8.47.3" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add RedCorners.Forms.ZXing --version 8.47.3
#r "nuget: RedCorners.Forms.ZXing, 8.47.3"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install RedCorners.Forms.ZXing as a Cake Addin
#addin nuget:?package=RedCorners.Forms.ZXing&version=8.47.3

// Install RedCorners.Forms.ZXing as a Cake Tool
#tool nuget:?package=RedCorners.Forms.ZXing&version=8.47.3

RedCorners.Forms.ZXing Changes

This library is a modified version of ZXing.Net.Mobile, with two major differences:

  • It contains methods to take pictures, essentially making ZXingScannerView a proper Camera view,
  • It does not include the ZXing DLL, and instead references its NuGet package,
  • The structure of the project is different and only Android and iOS are supported.

ZXing.Net.Mobile

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

Usage

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);
  	#endif
  	
	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.

Features

  • Xamarin.iOS
  • Xamarin.Android
  • 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

All of the platform samples have examples of custom overlays.

Product Compatible and additional computed target framework versions.
MonoAndroid monoandroid90 is compatible. 
Xamarin.iOS xamarinios10 is compatible. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (1)

Showing the top 1 NuGet packages that depend on RedCorners.Forms.ZXing:

Package Downloads
RedCorners.Forms.CameraView

A CameraView control for Xamarin.Forms (iOS and Android), based on ZXing.Net by Redth

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
9.0.1 415 8/18/2022
9.0.0 354 8/18/2022
8.47.3 616 5/20/2020
8.47.2-alpha 317 5/12/2020
8.47.1-alpha 323 5/8/2020

Fork of Redth/ZXing.Net.Mobile adding extra camera features.