Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ZXing with AVCaptureSession #38

Open
Wenfengcheng opened this issue Mar 26, 2019 · 0 comments
Open

ZXing with AVCaptureSession #38

Wenfengcheng opened this issue Mar 26, 2019 · 0 comments

Comments

@Wenfengcheng
Copy link
Owner

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

https://github.com/Redth/ZXing.Net.Mobile#using-apples-avcapturesession-ios7-built-in-barcode-scanning

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant