npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

cordova-plugin-scanzy-barcodescanner

v0.0.6

Published

Scanzy Barcode Scanner SDK

Downloads

2

Readme

cordova-plugin-scanzy-barcodescanner

cordova-plugin-scanzy-barcodescanner implements the barcode capture capabilities of the ScanzyBarcodeScannerSDK for iOS and Android. It supports reading a large number of different barcode symbologies, such as Code39, Code93, Code128, Codabar, UPC-A, UPC-E, EAN-8, EAN-13, ITF, QRCode, Aztec, PDF-417, Data Matrix, etc.

Learn more with the documentation or get started with sample

Getting Started

Install the plugin into the ionic cordova project

ionic cordova plugin add cordova-plugin-scanzy-barcodescanner --save

Or install the plugin into the ionic capacitor project

npm install cordova-plugin-scanzy-barcodescanner --save
ionic capacitor sync

Ready to Use

To use this plugin in Javascript:

Firstly, set the license, it's better to do it in your app's startup, although it's fine to call this function every single time when scan the barcode.


 ScanzyBarcodeManager.setLicense("YOUR LICENSE KEY");

Then, insert below code snippet into the place to scan barcode:


  scan = function () {
    var barcodeFormats = [ScanzyBarcodeFormat.Code128,ScanzyBarcodeFormat.Code39];
    var barcodeOptions = new ScanzyBarcodeOptions(true, true, true, true, barcodeFormats);
    ScanzyBarcodeManager.scan(this.scanSuccess.bind(this), this.scanFailure.bind(this), barcodeOptions);
  }
  
  
  scanSuccess = function (result) {
    console.log('scan result:', result.barcode, result.barcodeType);
    //your actual business logic to deal with the returned barcode text and barcode type from ScanzyBarcodeScannerSDK
  };

  scanFailure = function (err) {
    //your actual business logic to deal with the returned error from ScanzyBarcodeScannerSDK
  };

API Specification

Below gives you more details about the parameters:

The definition of ScanzyBarcodeFormat:

const ScanzyBarcodeFormat = {
  Code128:"Code128",
  Code39:"Code39",
  Code93:"Code93",
  CodaBar:"CodaBar",
  DataMatrix:"DataMatrix",
  EAN13:"EAN13",
  EAN8:"EAN8",
  ITF:"ITF",
  QRCode:"QRCode",
  UPCA:"UPCA",
  UPCE:"UPCE",
  PDF417:"PDF417",
  Aztec:"Aztec",
  MaxiCode:"MaxiCode"
}

Note: to set the formats you only interested, although you can add ALL formats, it definitely would impact the performance.

The ScanzyBarcodeOptions is defined as:

  function ScanzyBarcodeOptions(enableVibration, enableBeep, enableAutoZoom, enableScanCropRectOnly, formats) {
    this.enableVibration = enableVibration;
    this.enableBeep = enableBeep;
    this.enableAutoZoom = enableAutoZoom;
    this.enableScanCropRectOnly = enableScanCropRectOnly;
    this.formats = formats;
  }

enableVibration: vibrate your phone when barcode detected. enableBeep: play the beep sound when barcode detected. enableAutoZoom: the library will zoom in/out automatcially to scan the barcode. enableScanCropRectOnly: only scan the view finder area. formats: the barcode formats.

Support

if you have any questions or need help, check out our official website. Get a free trial license to try. It won't take more than one hour to integrate, insanely simple!