简体   繁体   English

在Android Xamarin上连续读取多个条形码

[英]Read Several Barcodes Continuously on Android Xamarin

I have used the zxing mobile scanner to scan barcodes before and it works perfectly (I have a button you press it and the camera opens for you to scan the barcode and then it closes and the code is sent to a specific textbox and thats it). 我以前使用过zxing移动扫描仪扫描条形码,并且效果很好(我按下了按钮,然后照相机打开,您可以扫描条形码,然后关闭,并将代码发送到特定的文本框,仅此而已) 。 But the problem is that if i want to read several barcodes i have to repeat this process over and over again. 但是问题是,如果我想读取多个条形码,我必须一遍又一遍地重复此过程。 What i want is to do the same and when the camera opens, leave the camera open and scan the barcodes without the activity being closed after each reading, and add each new barcode to a List for example. 我想要做的是做同样的事情,当相机打开时,让相机保持打开状态并扫描条形码,而每次读取后都不关闭活动,例如,将每个新条形码添加到列表中。 I was not able to find anything like this for android. 我找不到适用于Android的类似内容。 Is it possible? 可能吗? If it is, how its done? 如果是,它是如何完成的?

ZXing has a ScanContinuously() method ZXing具有ScanContinuously()方法

  var opt = new MobileBarcodeScanningOptions ();
  opt.DelayBetweenContinuousScans = 3000;

  //Start scanning
  scanner.ScanContinuously(opt, HandleScanResult);

The sample apps included with ZXing include a demo of this feature. ZXing附带的示例应用程序包含此功能的演示。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM