Skip to content

garyganyang/cluze-cordova-barcode-scanner

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

This is a cordova plugin which support Andorid only at the moment

this plugin support sigle & mutiple scan, and it is very quick.

How to use

###1. Download### cordova plugin add https://github.com/garyganyang/cluze-cordova-barcode-scanner.git

###2. Integrate with Ionic###

/* Single Scan*/
    $scope.cameraBarcode = function () {
        window.BarcodeScanner.singleScan(function (result) {
            $scope.$apply();
            $scope.barcode = result;
        }, function (e) {
            console.log(e);
        });
    };
/* Mutiple Scan*/
    var codes = ['6928393400082']; // this is for re-scan, 
                                   // if you pass this to multipleScan(), you can keep scanning
    $scope.camera = function () {
        window.BarcodeScanner.multipleScan(function (result) {
            $scope.$apply();
            iangular.forEach(result, function (each) {
              console.log(each);
            })
        }, function (e) {
            console.log(e);
        }, codes);
    };

About

cordova-barcode-scanner

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages