I am trying to save the state of the torch so that when a user re-opens the camera the torch is set to the same state as when they last closed the camera. However, if I enable to torch right after opening the camera, the torch flashes but does not stay on. If I add a 200ms delay the torch stays on as expected. I suspect this is because the torch is being turned on before the camera is finished being initialized/open and when it is open it defaults the torch to be off.
An observable for the camera being initalized and/or opened would be a more elegant and reliable solution. I worry that with older and slower deviced the 200ms delay won't be enough, but I don't want to increase that delay to the point it's noticable by users.
The torch not being reset by the camera opening would be great, but I assume that is being set at the OS level.
I only selected bardcode scanning as that is the only part of the library I have used, but I suspect the same issue woudl happen for all of the features.
Pay now to fund the work behind this issue.
Get updates on progress being made.
Maintainer is rewarded once the issue is completed.
You're funding impactful open source efforts
You want to contribute to this effort
You want to get funding like this too