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