【发布时间】:2017-05-02 16:13:16
【问题描述】:
我需要向现有的移动应用程序添加扫描功能。该应用程序将使用 zxing.mobile 包扫描条形码。
【问题讨论】:
标签: c# .net mobile xamarin zxing
我需要向现有的移动应用程序添加扫描功能。该应用程序将使用 zxing.mobile 包扫描条形码。
【问题讨论】:
标签: c# .net mobile xamarin zxing
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/
【讨论】: