Merge pull request #62 from tjwoon/noflashingflash

Resolve alternating flash during autofocus
This commit is contained in:
Daniel Cousens 2016-04-21 14:28:15 +10:00
commit c80f254496
2 changed files with 1 additions and 7 deletions

View File

@ -45,12 +45,6 @@ Status:
- Android: DONE - Android: DONE
- iOS: DONE - iOS: DONE
Quirks:
- __Android__: On Android API Level < 14, flash "on" may cause the flash to
alternate between on and off at about a half second/one second interval,
instead of making it stay on...
## LICENSE [Apache 2.0](LICENSE.md) ## LICENSE [Apache 2.0](LICENSE.md)

View File

@ -179,7 +179,7 @@ implements SurfaceHolder.Callback {
Camera.Parameters camParams = camera.getParameters(); Camera.Parameters camParams = camera.getParameters();
if(flashMode.equals("on")) { if(flashMode.equals("on")) {
camParams.setFlashMode(Camera.Parameters.FLASH_MODE_ON); camParams.setFlashMode(Camera.Parameters.FLASH_MODE_TORCH);
} else if(flashMode.equals("off")) { } else if(flashMode.equals("off")) {
camParams.setFlashMode(Camera.Parameters.FLASH_MODE_OFF); camParams.setFlashMode(Camera.Parameters.FLASH_MODE_OFF);
} else { } else {