Commit 1e3156b6 by Oscar Fuentes

Fix honeywell class

parent 9b7f8c1f
......@@ -42,7 +42,8 @@ public class EDA50K extends BaseScan implements BarcodeListener {
}
@Override
public void scan(final CordovaInterface cordova, CordovaWebView webView, JSONArray args, final CallbackContext callbackContext) {
public void scan(final CordovaInterface cordova, CordovaWebView webView, JSONArray args,
final CallbackContext callbackContext) {
if (manager == null) {
AidcManager.create(cordova.getActivity(), new CreatedCallback() {
......@@ -63,9 +64,11 @@ public class EDA50K extends BaseScan implements BarcodeListener {
// set the trigger mode to auto control
try {
barcodeReader.setProperty(BarcodeReader.PROPERTY_TRIGGER_CONTROL_MODE, BarcodeReader.TRIGGER_CONTROL_MODE_AUTO_CONTROL);
barcodeReader.setProperty(BarcodeReader.PROPERTY_TRIGGER_CONTROL_MODE,
BarcodeReader.TRIGGER_CONTROL_MODE_AUTO_CONTROL);
} catch (UnsupportedPropertyException e) {
Toast.makeText(cordova.getActivity(), "Failed to apply properties", Toast.LENGTH_SHORT).show();
Toast.makeText(cordova.getActivity(), "Failed to apply properties", Toast.LENGTH_SHORT)
.show();
}
Map<String, Object> properties = new HashMap<String, Object>();
......@@ -101,8 +104,7 @@ public class EDA50K extends BaseScan implements BarcodeListener {
}
}
});
}
else {
} else {
readBarcode(callbackContext);
}
}
......@@ -119,20 +121,17 @@ public class EDA50K extends BaseScan implements BarcodeListener {
@Override
public void onResume(boolean multitasking) {
super.onResume(multitasking);
if (barcodeReader != null) {
try {
barcodeReader.claim();
} catch (ScannerUnavailableException e) {
e.printStackTrace();
NotifyError("Scanner unavailable");
}
}
}
@Override
public void onPause(boolean multitasking) {
super.onPause(multitasking);
if (barcodeReader != null) {
// release the scanner claim so we don't get any scanner
// notifications while paused.
......
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