更新 src/android/ubxredscan.java

This commit is contained in:
2025-08-14 11:24:38 +08:00
parent 943779d6e3
commit 611dbff6d9

View File

@@ -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");
}
}