Quantcast
Channel: Recent Threads — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 204402

ZXing MobileBarcodeScanner able to Scan with Flashlight on ?

$
0
0

Hi everybody,

I am trying to create MobileScanner-App with Flashlight/Torch on.

Below is the code that I am using:

  var scanner = new ZXing.Mobile.MobileBarcodeScanner();
        var scanoptions = new ZXing.Mobile.MobileBarcodeScanningOptions();

        scanoptions.TryInverted = true;

        scanner.FlashButtonText = "Blitz";

        if(!scanner.IsTorchOn)
            scanner.Torch(true);

        var result = await scanner.Scan(scanoptions);

        scanner.AutoFocus();

        if (result != null)
        {
            ValidateScan(result.Text);
            scanHandler.PostDelayed(ResetScan, 2500);
        }

The code doesn't work. I have following Permissions added in the Manifest:






Any ideas to got this work?


Viewing all articles
Browse latest Browse all 204402

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>