I found this Question but it doesn't work for me. (Nothing happens. Tested on Wiko Rainbow Jam) Android - Camera2 : The easiest way to turn on the torch light
My App have to run on min. API Level 16! Is there an SupportCameraManager
or an Library (under Apache), which can I use?
SOLUTION: The problem was that I only got the camera's parameters when turning on the light and turning off the light. This must apparently also be done in the constructor or in the overwriting onStart method.
as fields:
And then you can start the flashlight with these snippets of code: Android - Camera2 : The easiest way to turn on the torch light