开发者

Flashlight is not working in Barcode scanner program (Zxing)

开发者 https://www.devze.com 2023-03-29 03:13 出处:网络
I use ZXing program for bar-code scanning the code scanning works well but flash light is not workingin the program any suggestion that will be helpful for me for further proceeding of 开发者_运维百科

I use ZXing program for bar-code scanning the code scanning works well but flash light is not working in the program any suggestion that will be helpful for me for further proceeding of 开发者_运维百科the code.

Thanks in Advance.


You can try following:

     CancellationTokenSource cancellationTokenSource = new CancellationTokenSource();
        TimeSpan timespan = new TimeSpan(0, 0, 0, 0, 0);
        Device.StartTimer(timespan, () =>
        {
            if (cancellationTokenSource.IsCancellationRequested)
            {
                return false;
            }

            scanner.Torch(true);

            return true;

        });

       scanner.Scan(Options);
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号