I want to have the flash on the phone turned on as well as the the front camera turned on while displaying the view. My current code does not turn on the flash even though it should camera
in the code refers to the front camera.
I believe this doesnt work because there is no flash associated with the front camera. My other way of doing this would be to open the front camera and turn its flash on, but to my knowledge that will be impossible since you can only have one camera open at a time and opening the rear camera will turn off the front camera and its display.
Parameters params = camera.getParameters();
params.setFlashMode(Parameters.FLASH_MODE_ON);
camera.setParameters(params);
camera.startPreview();
camera.autoFocus(new Camera.AutoFocusCallback() {
public void onAutoFocus(boolean success, Camera camera) {
}
});