1.0.8 • Published 11 months ago

cordova-plugin-easyqrcode v1.0.8

Weekly downloads
-
License
MIT
Repository
-
Last release
11 months ago

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)=>{};
1.0.8

11 months ago

1.0.7

11 months ago

1.0.6

11 months ago

1.0.5

11 months ago

1.0.4

11 months ago

1.0.3

11 months ago

1.0.2

11 months ago

1.0.1

11 months ago

1.0.0

11 months ago