Closed dileepbolisetti closed 5 years ago
Can you give me an example of how to do this, I have set it using a state var but it still doesnt work on my honor P9 lite, the torch just doesnt work. I also noticed the even with the type set to QR the camera still reads barcode, its almost as if its ignoring the props.
Got confused the similar way - Basically it is being considered only after camera initialisation. So if we have a button in the same view where camera is present, on click of it - you can toggle this in state variable.
state - initially - torchMode = OFF
when button is clicked - set torchMode = ON - thats what @jqn was referring to.
@dileepbolisetti you have to toggle torchmode to on via a user interaction. Torchmode should be initialized to off then toggle to on.