In this tutorial, we show you how to turn on/off the phone camera led or flashlight in Android. See code snippets :
1. Turn on
camera = Camera.open(); Parameters p = camera.getParameters(); p.setFlashMode(Parameters.FLASH_MODE_TORCH); camera.setParameters(p); camera.startPreview();