I try to force a S5 to focus at Infinity using the following code:
myCamera.cancelAutoFocus();
parameters.setFocusMode(Camera.Parameters.FOCUS_MODE_INFINITY);
myCamera.setParameters(parameters);
before displaying the preview:
myCamera.setPreviewDisplay(myHolder);
myCamera.startPreview();
I control the setting with
parameters = myCamera.getParameters();
which yields "infinity" alright
but the camera still hunts for focus the same way it does in continuous-picture.
(the same code used with a Nexus 7 works fine).
Does anyone have already experienced such trouble with a S5?
Thank-you for any suggestion.
Yes, Samsung seems to have screwed up, and then users end up blaming unrelated app developers for their device's auto-focus problem. The Galaxy S5 is by far the biggest offender in my experience, but other recent Samsung models seem to do it too. It did not seem to be a problem on the older S3.
These somewhat recent Samsungs will report that they support infinity focus, and will accept that mode setting, but that's completely broken... It will just continually refocus while recording, making the resulting video downright irritating to watch and often unusable.
I have not found a fix for this, other than to just avoid using the infinity mode entirely, and instead using fixed mode (if supported), or attempting to fix the focus in auto mode. In my case, I made it a user option, which is turned off by default due to the sheer number of people using broken Samsungs.