I try to lock focus after my user camera finds focus. First, the autofocus mode is set to auto:
builder.set(CaptureRequest.CONTROL_AF_MODE, CaptureRequest.CONTROL_AF_MODE_AUTO);
And after touching the preview, it finds the focus distance, and I need to lock AF and AE with this code:
builder.set(CaptureRequest.CONTROL_AF_MODE, CaptureRequest.CONTROL_AF_MODE_CONTINUOUS_PICTURE); builder.set(CaptureRequest.CONTROL_AE_LOCK, true);
AE lock works great on any device. Autofocus lock works on Nexus5 and Nexus 5x. But as for the Samsung S5 and S6, he is trying to find the focus.
What is the best way to lock focus?
android android-camera2
imudin07
source share