I would like to know if there is a way to know when the autofocus is done?
I have a app that doing some image processing on video. My first thing that I need to do is to turn on the flash and the autofocus, my problem is that I don't know if the autofocus is done or not (I need to know it programmatically) so I can start all the image processing only after the auto focus is done.
This is how I configure the camera settings :
@Override
public void surfaceCreated(SurfaceHolder arg0) {
try {
camera = Camera.open();
parameters = camera.getParameters();
parameters.setFlashMode(Parameters.FLASH_MODE_TORCH);
parameters.setFocusMode(Parameters.FOCUS_MODE_AUTO);
camera.setParameters(parameters);
camera.setPreviewDisplay(holder);
camera.startPreview();
recorder = new MediaRecorder();
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
I just want to be clear, everything is working good, I just want to know when exactly the autofocus is done.
Thanks!