我使用 ZXing 程序进行条码扫描,代码扫描效果很好,但程序中的闪光灯不工作任何对我进一步处理代码有帮助的建议。
提前致谢。
最佳答案
您可以尝试以下操作:
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);
关于android - 手电筒在条形码扫描器程序 (Zxing) 中不起作用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7089000/