Flashlight is not working in Barcode scanner program (Zxing)
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);
精彩评论