如何使用zxing.mobile向Xamarin Forms IOS应用添加条形码SANNING功能



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

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/

相关内容

  • 没有找到相关文章

最新更新