cordova-plugin-easyqrcode

1.0.8 • Public • Published

Cordova-plugin-easyqrcode

fork of cordova-plugin-zbar This plugin integrates with the ZBar library, exposing a JavaScript interface for scanning barcodes (QR Code, EAN-13/UPC-A, UPC-E, EAN-8, Code 128, Code 39, Interleaved 2 of 5, 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.

Install the plugin using:

cordova plugin add cordova-plugin-easyqrcode

Supported Platforms

  • Android
  • iOS

Use the plugin in your JS file:

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

- **params**: Optional parameters:

    ```javascript
    {
        text_title: "OPTIONAL Title Text - default = 'Scan QR Code'", // Android only
        text_content: "OPTIONAL Instruction Text - default = 'Please point your camera at the QR code.'", // Android only
        text_instructions: "OPTIONAL Instruction Text - default = 'Please point your camera at the QR code.'", // Android only
        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.
    }
    ```

- **onSuccess**: function (s) {...} _Callback for successful scan._
- **onFailure**: function (s) {...} _Callback for cancelled scan or error._

Example:

declare const cloudSky: any;

cloudSky.zBar.scan({camera:"back"}, (success)=>{}), (failure)=>{};

Dependencies (0)

    Dev Dependencies (0)

      Package Sidebar

      Install

      npm i cordova-plugin-easyqrcode

      Weekly Downloads

      0

      Version

      1.0.8

      License

      MIT

      Unpacked Size

      10.9 MB

      Total Files

      47

      Last publish

      Collaborators

      • bxb223