Giter Club home page Giter Club logo

cordova-plugin-dbr's Introduction

Dynamsoft Barcode Reader Cordova Plugin for iOS and Android

Use the Dynamsoft Barcode Reader Cordova Plugin to quickly develop mobile apps for barcode reading (iOS and Android).

To learn more about Dynamsoft Barcode Reader, please visit http://www.dynamsoft.com/Products/Dynamic-Barcode-Reader.aspx.

License

You can request for a free trial license online. Get a trial license >

Installation

  1. Install Cordova via npm.

        npm install -g cordova
    
  2. Download the source code and add the plugin via local path.

        cordova plugin add <local-path>/cordova-plugin-dbr
    

    Or you can install the plugin via repo URL directly.

        cordova plugin add https://github.com/dynamsoft-dbr/cordova-plugin-dbr.git
    

Supported Platforms

  • iOS
  • Android

Supported Barcode Types

The following barcode types are currently supported:

  • Code 39
  • Code 93
  • Code 128
  • Codabar
  • EAN-8
  • EAN-13
  • UPC-A
  • UPC-E
  • Interleaved 2 of 5 (ITF)
  • Industrial 2 of 5 (Code 2 of 5 Industry, Standard 2 of 5, Code 2 of 5)
  • ITF-14
  • QRCode
  • DataMatrix
  • PDF417
  • GS1 DataBar
  • Maxicode
  • Micro PDF417
  • Micro QR
  • PatchCode
  • GS1 Composite

Others

If your cordova-android version >6.3.0, please change repositories flatDir dirs 'libs' to dirs 'src/main/libs' and change dependencies compile 'com.android.support:support-v4:+' to compile 'com.android.support:support-v4:27.1.0' in flie cordova-plugin-dbr/src/android/barcodescanner.gradle

Example

index.html

<body>
    <div class="app">
        <div id="deviceready">
            <button id="scan">scan barcode</button>
        </div>
    </div>
    <script type="text/javascript" src="cordova.js"></script>
    <script type="text/javascript" src="js/index.js"></script>
</body>

index.js

onDeviceReady: function() {
        document.getElementById("scan").onclick = function() {
                        cordova.plugins.barcodeScanner.scan(
                                                            function (result) {
                                                            alert("Results: \n" +
                                                                   result.text + "\n" +
                                                                   result.format + "\n" +
                                                                  "Cancelled: " + result.cancelled);
                                                            },
                                                            function (error) {
                                                            alert("Scanning failed: " + error);
                                                            },
                                                            {
                                                            "preferFrontCamera" : false, // iOS and Android
                                                            "showFlipCameraButton" : true, // iOS and Android
                                                            "dynamsoftlicense": "your license ",//set the dynamsoftbarcodereader license
                                                            //"dynamsoftlicenseKey": "", //set the server license key
                                                            }
                                                            );
                    }
        this.receivedEvent('deviceready');
},

Technical Support

Contact Dynamsoft

Screenshots

cordova-plugin-dbr's People

Contributors

lybiu avatar tenocht1tlan avatar yushulx avatar yanshen6 avatar guigenyi avatar rachyj avatar colorcorw avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.