0

I am using zxing to scan barcodes, zxing is not working as well as I would like. Requires scanning with external QRbot app. I run QRbot from the app, but I don't know how to get the response, after scanning, the URL opens. How to get value? (Google translate). QRbot Documentation https://ioshelp.qrbot.net/xcallback

private async void btn_zxing_Clicked(object sender, EventArgs e) // scan zxing
        {
            var scan = new ZXingScannerPage();
            await Navigation.PushAsync(scan);
            scan.OnScanResult += (result) =>
            {
                Device.BeginInvokeOnMainThread(async () =>
                {
                    await Navigation.PopAsync();
                    searchInfo(result.ToString());
                });
            };
        }

Launching QRbot, I don't know how to get the Barcode.

private async void QRbot_Clicked(object sender, EventArgs e)
        {
            Uri uri = new Uri("https://qrbot.net/x-callback-url/scan?x-success=https%3A%2F%2Fyourwebsite.com");
            await Browser.OpenAsync(uri, BrowserLaunchMode.SystemPreferred);
        }
Jasur1177
  • 25
  • 1
  • 6

1 Answers1

0

You could use ZXingScannerView to scan the barcode without QRbot.

   <zxing:ZXingScannerView Grid.Row="1" x:Name="_scanView" OnScanResult="Handle_OnScanResult" IsScanning="true"
                        WidthRequest="200" HeightRequest="200" />

For more details about the code sample, you could check the code sample i done before. How to embed ZXing scanner in PageRenderer/Fragment/View into Xamarin.Forms ContentPage?

Wendy Zang - MSFT
  • 10,509
  • 1
  • 7
  • 17
  • This scanner view does not work any where near as well as the QRBot external app. I have a usecase where we have tried ZXing however it doesn't read smaller barcodes and we are required to use QRBot or use a paid solution – Matthew Jones Jun 22 '22 at 07:55