【问题标题】:How to add Bar Code Sanning feature to xamarin forms IOS app using Zxing.Mobile如何使用 Zxing.Mobile 将条形码扫描功能添加到 xamarin 表单 IOS 应用程序
【发布时间】:2017-05-02 16:13:16
【问题描述】:

我需要向现有的移动应用程序添加扫描功能。该应用程序将使用 zxing.mobile 包扫描条形码。

【问题讨论】:

标签: c# .net mobile xamarin zxing


【解决方案1】:
for xamarin forms
var scanPage = new ZXingScannerPage ();
// Navigate to our scanner page
await Navigation.PushAsync (scanPage);



scanPage.OnScanResult += (result) => 
{
    // Stop scanning
    scanPage.IsScanning = false;

    // Pop the page and show the result
    Device.BeginInvokeOnMainThread (async () => 
    {
        await Navigation.PopAsync ();        
        await DisplayAlert("Scanned Barcode", result.Text, "OK");
    });
};


Documenation is here in this link
https://blog.xamarin.com/barcode-scanning-made-easy-with-zxing-net-for-xamarin-forms/

【讨论】:

    猜你喜欢
    • 2022-06-22
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2013-02-18
    • 1970-01-01
    • 1970-01-01
    • 2017-07-08
    相关资源
    最近更新 更多