Commit ec305dcf authored by Matthias Rütten's avatar Matthias Rütten

use new barcodescanner-release

parent ed718fa6
......@@ -111,7 +111,9 @@ A full example could be:
{
resultDisplayDuration: 500, // Android, display scanned text for X ms. 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
upperViewlabel: 'Center barcode on your card between the corners',
lowerViewlabel: 'Barcode will scan automatically.\nTry to avoid shadows and glare.',
cancelButtonlabel: 'Cancel', // only iOS
disableAnimations : true
}
);
......
......@@ -50,7 +50,7 @@
<uses-feature android:name="android.hardware.camera" android:required="true"/>
</config-file>
<framework src="src/android/barcodescanner.gradle" custom="true" type="gradleReference"/>
<resource-file src="src/android/barcodescanner-release-2.1.5.aar" target="libs/barcodescanner.aar"/>
<resource-file src="src/android/barcodescanner-release.aar" target="libs/barcodescanner.aar"/>
<dependency id="cordova-plugin-compat" version="^1.0.0"/>
</platform>
<platform name="windows">
......
......@@ -51,6 +51,8 @@ public class BarcodeScanner extends CordovaPlugin {
private static final String TORCH_ON = "torchOn";
private static final String FORMATS = "formats";
private static final String PROMPT = "prompt";
private static final String UPPER_VIEW_LABEL = "upperViewlabel";
private static final String LOWER_VIEW_LABEL = "lowerViewlabel";
private static final String TEXT_TYPE = "TEXT_TYPE";
private static final String EMAIL_TYPE = "EMAIL_TYPE";
private static final String PHONE_TYPE = "PHONE_TYPE";
......@@ -186,6 +188,12 @@ public class BarcodeScanner extends CordovaPlugin {
if (obj.has(PROMPT)) {
intentScan.putExtra(Intents.Scan.PROMPT_MESSAGE, obj.optString(PROMPT));
}
if (obj.has(UPPER_VIEW_LABEL)) {
intentScan.putExtra(Intents.Scan.UPPER_VIEW_LABEL, obj.optString(UPPER_VIEW_LABEL));
}
if (obj.has(LOWER_VIEW_LABEL)) {
intentScan.putExtra(Intents.Scan.LOWER_VIEW_LABEL, obj.optString(LOWER_VIEW_LABEL));
}
if (obj.has(ORIENTATION)) {
intentScan.putExtra(Intents.Scan.ORIENTATION_LOCK, obj.optString(ORIENTATION));
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment