I work on video recording; everything works except for requesting continuous focus. This is what I do (tried both in surfaceCreated and surfaceChanged with no success):
You should check if Continuous Auto Focus is supported by the device. This is something that works for me, please give it a try.
boolean startContinuousAutoFocus() {
Camera.Parameters params = mCamera.getParameters();
List focusModes = params.getSupportedFocusModes();
String CAF_PICTURE = Parameters.FOCUS_MODE_CONTINUOUS_PICTURE,
CAF_VIDEO = Parameters.FOCUS_MODE_CONTINUOUS_VIDEO,
supportedMode = focusModes
.contains(CAF_PICTURE) ? CAF_PICTURE : focusModes
.contains(CAF_VIDEO) ? CAF_VIDEO : "";
if (!supportedMode.equals("")) {
params.setFocusMode(supportedMode);
mCamera.setParameters(params);
return true;
}
return false;
}