-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
onSetTorchOn() #128
Comments
Hello, Thanks :) |
Will look into this before the next release. |
@Bajranghudda1 It seems like one current issue is that the TorchListener is not called when e.g. after rotating the device, so you may be calling e.g. |
Thanks for your quick reply, i must say you people are really doing well 👍 My screen orientation is only portrait, and there is no such case of rotating the device and i am sure that there is no resume and pause like case. Actually on each bar code before to scan i need to turn on (setTorchOn()) and when barcode detected (in callback), i make it off (setTorchOff()) and i do all the time for all items scan. |
Hi, Thanks (: Peace V |
For auto flash light you doing isAutoFlashLightEnabled(boolean), and for this you using light sensor and if darkness density is 45.0f (will turn of flash) and 450.0f will turn off flash, i think it is worst if instantly light sensor has been covered by user's shadow. I think this torch auto On/Off can be improved by using logic like android's Camera app does, i tested Camera app not using Light sensor for detecting darkness. |
Hello @rkistner , It's working fine in below devices.... Moto G, Samsung Dues (GT-I8262), Samgung S4** I/CameraConfiguration﹕ Requesting flash mode value from among: [torch, on] But its not working only in *Samsung Note 4 * D/ViewRootImpl﹕ ViewPostImeInputStage ACTION_DOWN |
Closing as a device-specific issue. |
I have a button, and onClick it first time i call setTorchOn() and and second time i call onTorchOff() (like a toggle button).
But the issue is sometimes onSetTorchOn() method is unable to ON the torch, for to ON, i have to tap again torch button, i think its library issue.
My test is like this....
i call setTorchOn() 100 times and in which 10 times torch was unable to ON.
i call setTorchOn() 10 times and in which 2 times torch was unable to ON
i call setTorchOn() 50 times and in which 3 times torch was unable to ON
Can you see this into, thanks in advance :-)
The text was updated successfully, but these errors were encountered: