我在用ZXing.Mobile.Forms扫描条形码。我正在尝试扫描Code39格式的条形码。如果条形码的值较少,比如1231214,14123,那么它会给我一个结果。但它不扫描值大于32位的条形码。我附上了扫描失败的条形码图像。barcode image
请帮我解决这个问题。
这是我从示例中获得的代码:
var scanner = new ZXing.Mobile.MobileBarcodeScanner();
var option = new ZXing.Mobile.MobileBarcodeScanningOptions { UseCode39ExtendedMode = true, TryHarder = true, PureBarcode = true };
var result = await scanner.Scan(option);
if (result != null)
await Application.Current.MainPage.DisplayAlert("It says..", result.Text, "Cancel");
await Application.Current.MainPage.Navigation.PopAsync(true);谢谢,Ajithbabu
发布于 2018-05-29 22:32:16
我刚刚使用ZXing.Net.Mobile.Forms版本的2.4.1对iOS设备进行了快速测试,它与您的镜像:1M8GDM9AXKPO42788可以正常工作。所以这不是库问题,而是硬件问题、代码问题或可见性条件。
以下是为我工作的代码:
async void Handle_Clicked(object sender, System.EventArgs e)
{
var scanner = new ZXing.Mobile.MobileBarcodeScanner();
var result = await scanner.Scan();
if (result != null)
Console.WriteLine("Scanned Barcode: " + result.Text);
}https://stackoverflow.com/questions/50586286
复制相似问题