0 suppresses it entirely, default 1500 formats : "QR_CODE,PDF_417", // default: all but PDF_417 and RSS_EXPANDED orientation : "landscape", // Android only (portrait|landscape), default unset so it rotates with the device disableAnimations : true, // iOS disableSuccessBeep: false // iOS and Android PreferFrontCamera : true, // iOS and Android showFlipCameraButton : true, // iOS and Android showTorchButton : true, // iOS and Android torchOn: true, // Android, launch with the torch switched on (if available) saveHistory: true, // Android, save scan history (default false) prompt : "Place a barcode inside the scan area", // Android resultDisplayDuration: 500, // Android, display scanned text for X ms. Data is the text representation of the barcode data, type is the type of barcode detected and cancelled is whether or not the user cancelled the scan.Ī full example could be: ( Success is passed an object with data, type and cancelled properties. The following barcode types are currently supported: Barcode Type The plugin creates the object with the method scan(success, fail). On PhoneGap Build if you're using a version of cordova-android of 4 or less, ensure you're building with gradle: Using the plugin If you want to build/run Windows 10 app, you should specify target architecture explicitly, for example (Cordova CLI): cordova run windows -archs=x86 Note: Windows 10 applications can not be build for An圜PU architecture, which is default for Windows platform. Any updates to the Library Project should be Plugman currently doesn't support Library Project refs, so its been Note: the Android source for this project includes an Android Library Project. Windows (Windows/Windows Phone 8.1 and Windows 10).phonegap plugin add cordova-plugin-qr-barcode-scanner -variable ANDROID_SUPPORT_V4_VERSION="27.1.1" This plugin requires the Android support library v4. ![]() It is also possible to install via repo url directly ( unstable ) phonegap plugin add cordova-plugin-qr-barcode-scanner This requires phonegap 7.1.0+ ( current stable v8.0.0 ) phonegap plugin add cordova-plugin-qr-barcode-scanner ![]() Installation with cordova cli: cordova plugin add cordova-plugin-qr-barcode-scanner The button icons are in the directory src/android/barcodescanner-release-2.1.5/res/drawable.Īfter you change an icon, or anything else in the folder src/android/barcodescanner-release-2.1.5, you need to run the previous commands as well.įollows the Cordova Plugin spec, so that it works with Plugman. To customize the design layout for the scanning interface, edit this file: src/android/barcodescanner-release-2.1.5/res/layout/capture.xml, then run this commands: cd src/android/barcodescanner-release-2.1.5 This is a fork of phonegap/phonegap-plugin-barcodescanner with the only difference being the design of the scaning interface. Cross-platform BarcodeScanner for Cordova / PhoneGap.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |