bloxlab / BarcodeScannerWP8

Cordova plugin to enable barcode scanning on Windows Phone 8
6 stars 5 forks source link

BarcodeScannerWP8

Cordova/PhoneGap plugin to enable barcode scanning on Windows Phone 8 using the device's camera.

Licence

None

Installation

Using CLI:

Usage

Call the method window.cordova.plugins.barcodeScanner.scan, passing in a success and fail call back. Example:

        function scanBarcode() {
            function onSuccess(result) {
                console.log("Barcode is: " + result.text);
                console.log("Barcode format: " + result.format);
            }

            function onFail(error) {
                console.log(error);
            }

            window.cordova.plugins.barcodeScanner.scan(onSuccess, onFail);
        }

(Device will vibrate after detecting a barcode.)