Is there any way to check once you have tried to turn the flashlight on if it has worked or not?
I'm using:
p.setFlashMode(Parameters.FLASH_MODE_TORCH);
cam.setParameters(p);
cam.startPreview();
To turn the camera on. This works with most phones, but not with all phones so I need to know if it's worked or not.
Edit: Just to be clear, I need to know if turning the flash on has actually worked or not. Sometimes you need to use FLASH_MODE_ON instead of FLASH_MODE_TRUE, and sometimes you need to use FLASH_MODE_ON even when
List<String> flashModes = p.getSupportedFlashModes();
flashModes.contains(Parameters.FLASH_MODE_TORCH)
returns true.
Thanks for any help.