I'm developing an Android application with a camera-related functionality feature.
First of all, I read a lot of stuff on SO, XDA and so on, then please don't redirect me to other useless posts.
I am trying to implement something like a "fixed focus mode", so that:
FOCUS_MODE_AUTO
(or something else);I tried different solutions, i.e.:
mCamera.cancelAutoFocus()
in the AutoFocusCallback
to prevent the adjustment of the focus;FocusArea
: new Camera.Area(new Rect(-50, -50, 50, 50), 1000)
to fix the focus on the current area.I'm targeting API 20 and I'm working on a Samsung Galaxy S5. On this device, the supported focus modes are: - auto - infinity - macro - continuous-video - continuous-picture
The suggestion that I found more frequently is to recompile Android...
"AUTO" mode doesn't mean that the camera continuously focuses - just that when you call the autoFocus command the focus is done automatically with no indication on what result you expect not like "Macro" or "Infinity".
So if you don't have a loop that calls the autoFocus (as many examples do or call it again in the Callback) your focus should stay after it runs once.