在ScanAPI中使用远程触发器进行扫描(Scanning using remote trigger in ScanAPI)

系统教程 行业动态 更新时间:2024-06-14 16:57:18
在ScanAPI中使用远程触发器进行扫描(Scanning using remote trigger in ScanAPI)

我正在使用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.

更多推荐

本文发布于:2023-04-12 20:18:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/dzcp/407455c221d752e9df268b7d328ef428.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:触发器   ScanAPI   Scanning   trigger   remote

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!