Are there any options to turn on the flash for an undefined time when the phone does not support FLASH_MODE_TORCH in Camera.Parameters?
I know that this is possible because there are many applications running on my phone (Samsung Galaxy ACE), but I have not yet found the answer.
I just came:
Camera camera = Camera.open(); Camera.Parameters params = camera.getParameters(); params.setFlashMode(Camera.Parameters.FLASH_MODE_ON) //because FLASH_MODE_TORCH isnt supported camera.setParameters(params); camera.startPreview(); camera.autoFocus(new AutoFocusCallback(){ public void onAutoFocus(boolean success, Camera camera){ camera.autoFocus(this); } });
but this works with a slight delay, for example, 1/10 of a second.
is anyone
source share