Zxing qr scan UI set to a selected widget like texture view.

MuthuMKMuthuMK GBMember ✭✭
edited January 2017 in Xamarin.Android

I am working on project which requires qr scanning and I use zxing library. It works fine on button click event. But I want to scan QR code in the 1st UI when UI loaded (probably on create event). Can someone help me with this.

Best Answer

Answers

  • SebastianSeidel.9226SebastianSeidel.9226 DEInsider, University ✭✭✭✭

    Creating your reference to views in OnCreate is totally ok. If you just want to start the scan process move your code from your button inside the OnCreate method. To help you any further I need to see some code.

  • MuthuMKMuthuMK GBMember ✭✭

    btnCamera.Click += async (sender, e) =>
    {

                var scanner = new ZXing.Mobile.MobileBarcodeScanner();
                var result = await scanner.Scan();
        string qrCode = result.ToString();
    

    }

    This is the button click code which is directly taking qr scan from the zxing libry. What I wnat is having button and the scanning window in same screen

Sign In or Register to comment.