Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

cordova-plugin-cszbar-exj

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cordova-plugin-cszbar-exj

Plugin to integrate with the ZBar barcode scanning library.

  • 1.5.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
0
Maintainers
1
Weekly downloads
 
Created
Source

/!\ Before doing anything /!\

This plugin is a fork from tjwoon's csZBar plugin and currently used for personal uses.

The main problem this plugin is trying to solve is the customization of the ZBar layout, like adding button & stuff...

All credit should go to 'tjwoon' for all work before 1.3.3

Thank you.

ZBar Barcode Scanner Plugin

This plugin integrates with the ZBar library, exposing a JavaScript interface for scanning barcodes (QR, 2D, etc). In this fork a button has been added to turn off and on device flash. In addition the plugin can now handle the device orientation change.

Installation

This plug-in is available on npm, be careful of the version.

Install from NPM :

ionic plugin add cordova-plugin-cszbar-exj

or you can install it from GitHub :

ionic plugin add https://github.com/aNkM/csZBar.git

API

Scan barcode

cloudSky.zBar.scan(params, onSuccess, onFailure)

Arguments:

  • params: Optional parameters:

    {
        camera: "front" || "back", // defaults to "back"
        flash: "on" || "off" || "auto", // defaults to "auto". See Quirks
        drawSight: true || false, // defaults to true, create a red sight/line in the center of the scanner view.
        connected: true || false, // defaults to false, triggers the appearance of the login button if false
        askOpen: true || false // shows openDialogPopup if the barcode is an external url
    }
    
  • onSuccess: function (s) {...} Callback for successful scan.

  • onFailure: function (s) {...} Callback for cancelled scan or error.

Return:

  • success('scanned bar code') Successful scan with value of scanned code
    • open : (String) equals to "true" || "false", inform the app to re-open the scanner
    • text : (String) result of the scan, can be an url or just a number
    • format : (String) format of the scan, can be "QRCODE" || "EAN13" || ...
  • error('cancelled') If user cancelled the scan (with back button etc)
  • error('misc error message') Misc failure

Status:

  • Android:
    • Layout : in progress
    • Scan : DONE
  • iOS:
    • Layout : TODO
    • Scan : DONE

LICENSE Apache 2.0

This plugin is released under the Apache 2.0 license, but the ZBar library on which it depends (and which is distribute with this plugin) is under the LGPL license (2.1).

Thanks

Thank you to @tjwoon, @PaoloMessina and @nickgerman for code contributions before 1.3.3.

Keywords

FAQs

Package last updated on 21 Jul 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc