我需要将扫描功能添加到现有移动应用程序中。该应用程序将使用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/