My code must automatically turn on the flashlight LED when the light is insufficient.
I can turn the flashlight on in the torch mode:
camera = Camera.open();
final Parameters p = camera.getParameters();
// ...
p.setFlashMode(Parameters.FLASH_MODE_TORCH);
camera.setParameters(p);
But I must not turn it on when it is not needed.
How do I find out, programmatically, whether I need to turn the flashlight on?
In other words, how can my application know if there's enough light?