zxing.HasTorch returns false on Android even phone has a torch
See original GitHub issueI tried your sample and code below doesn’t display the flash button although my phone has has torch, HasTorch returns always false. If set it true, torch is just working fine on my code. it seems like a bug on android. I tried 3 beta as well. same problem
overlay = new ZXingDefaultOverlay()
{
TopText = "Hold your phone up to the barcode",
BottomText = "Scanning will happen automatically",
ShowFlashButton = zxing.HasTorch,
AutomationId = "zxingDefaultOverlay",
};
Issue Analytics
- State:
- Created 3 years ago
- Reactions:1
- Comments:5 (1 by maintainers)
Top Results From Across the Web
Turn ON/OFF flashlight in zxing fragment lib
I have used following library: https://code.google.com/p/barcodefraglibv2/ I want to turn ON/OFF the flash light on click of a button when ...
Read more >ZXing.Net.Mobile
HasTorch delivers false on a real iOS device (iPhone 6s Plus with iOS 9.2).
Read more >Creating Custom Overlays in Xzing Barcode Scanner using ...
I've recently had need to customize the UI overlay of the excellent and free barcode scanning plugin Zxing. While gathering material for ...
Read more >mobile_scanner | Flutter Package
A universal barcode and QR code scanner for Flutter based on MLKit. Uses CameraX on Android, AVFoundation on iOS and Apple Vision &...
Read more >C# (CSharp) ZXingScannerView Examples
C# (CSharp) ZXingScannerView - 33 examples found. ... Add(torch); BUG on library, this returns always FALSE customOverlayBottom.Children.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

@knocte , I will try 3.0 beta next week.
I had the same issue and it appeared that I didn’t have the Android FLASHLIGHT permission in the AndroidManifest.xml (silly me).