I am working on a video recording; everything works, except for the continuous focus request. This is what I am doing (tried both in the surfaceCreated method and in the surfaceChanged method without success):
camera = Camera.open(); camera.setPreviewDisplay(holder); Parameters parameters = camera.getParameters();
then i do either
parameters.setFocusMode(Parameters.FOCUS_MODE_CONTINUOUS_VIDEO);
or
parameters.set("focus-mode", "continuous-video");
both must do the same; then I set the parameters with
camera.setParameters(parameters);
This last line always fails! So am I missing something?
By the way, I am testing fairly new devices, such as Desire HD, Galaxy S, Galaxy Tab 7 and 10.1, which should have continuous autofocus support; at least their built-in camera apps support it.
source share