mobile_scanner
mobile_scanner copied to clipboard
Stopping camera resets torch state to off
Hello,
I have an app where I need to stop the camera in order to take some time for processing the qrcode. I also have a torchlight implemented using the ValueListenableBuilder
in the example. If I'm running controller.stop()
the flashlight is turned of. Is this intentional? I somehow wanted to reenable it when running controller.start()
but it seems like if it's ignored.
I somehow managed to work around by introducing another variable called _isTorchEnabled but then I run into the following issue and my camera just doesn't scan any codes anymore:
W/System (26528): A resource failed to call Surface.release.
I/BpBinder(26528): onLastStrongRef automatically unlinking death recipients: <uncached descriptor>
Any hints? Or any way to enable the torch if it was enabled before stopping the controller?
Best regards and thanks a lot for your hard work <3! Verry
- Might be related to #194 and #190
The torch is linked to the camera state, in other words, you can only turn the torch on when the camera is running.
So the torch turning off when the camera does is intentional.