更新 src/android/ubxredscan.java
This commit is contained in:
@@ -140,7 +140,7 @@ public class ubxredscan extends CordovaPlugin {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
mScanManager.switchOutputMode(0);
|
mScanManager.switchOutputMode(1);
|
||||||
IntentFilter filter = new IntentFilter();
|
IntentFilter filter = new IntentFilter();
|
||||||
int[] idbuf = new int[]{PropertyID.WEDGE_INTENT_ACTION_NAME, PropertyID.WEDGE_INTENT_DATA_STRING_TAG};
|
int[] idbuf = new int[]{PropertyID.WEDGE_INTENT_ACTION_NAME, PropertyID.WEDGE_INTENT_DATA_STRING_TAG};
|
||||||
String[] value_buf = mScanManager.getParameterString(idbuf);
|
String[] value_buf = mScanManager.getParameterString(idbuf);
|
||||||
@@ -175,6 +175,7 @@ public class ubxredscan extends CordovaPlugin {
|
|||||||
}
|
}
|
||||||
if (mScanManager != null) {
|
if (mScanManager != null) {
|
||||||
this.callbackContext = callbackContext;
|
this.callbackContext = callbackContext;
|
||||||
|
mScanManager.switchOutputMode(0);
|
||||||
mScanManager.openScanner();
|
mScanManager.openScanner();
|
||||||
mScanManager.startDecode();
|
mScanManager.startDecode();
|
||||||
}
|
}
|
||||||
@@ -187,6 +188,7 @@ public class ubxredscan extends CordovaPlugin {
|
|||||||
}
|
}
|
||||||
if (mScanManager != null) {
|
if (mScanManager != null) {
|
||||||
mScanManager.stopDecode();
|
mScanManager.stopDecode();
|
||||||
|
mScanManager.switchOutputMode(1);
|
||||||
callbackContext.success("OK");
|
callbackContext.success("OK");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user