我正在使用API中的调用:
.setSoftScanTrigger(ISktScanProperty.values.trigger.kSktScanTriggerStart);为什么从ZXing启动条码扫描器? 我想在Socket 8ci上进行物理扫描。 我在iOS中成功地做到了这一点,但Android SDK似乎成了问题。 我想确认这是否是这种情况。
I am using the call within the API:
.setSoftScanTrigger(ISktScanProperty.values.trigger.kSktScanTriggerStart);Why is it firing up the Barcode scanner from ZXing? I would like to fire a physical scan on the Socket 8ci. I am successfully doing this in iOS but the Android SDK seems to be the problem. I would like to confirm if this is the case either way.
最满意答案
如方法名称所示, setSoftScanTrigger触发Android上的ZXing“软件扫描器”。
该方法只是在ScanApiHelper上调用一个方法,传入软件扫描器作为要触发的设备。
public void setSoftScanTrigger(char action) { _scanApiHelper.postSetTriggerDevice(_softScanDevice, action, _onSetTrigger); }如果你有一个你想要触发的物理设备的参考,你可以用同样的方式触发它。
您将需要修改您的SingleEntryApplication ,因为它默认情况下不会保留对物理扫描仪的任何引用。 但是,您可以在设置和取消设置软件扫描器的引用( onDeviceArrival和onDeviceRemoval方法)的同一位置设置和取消设置物理设备引用。
As the method name suggests, setSoftScanTrigger triggers the "soft scanner" which is ZXing on Android.
That method just calls a method on ScanApiHelper, passing in the soft scanner as the device to be triggered.
public void setSoftScanTrigger(char action) { _scanApiHelper.postSetTriggerDevice(_softScanDevice, action, _onSetTrigger); }If you have a reference to the physical device you'd like to trigger, you could trigger it in the same way.
You would need to modify your SingleEntryApplication, because it doesn't keep any references to physical scanners, by default. However, you can set and unset your physical device reference in the same place as it sets and unsets the reference to the soft scanner - the onDeviceArrival and onDeviceRemoval methods.
更多推荐
发布评论