I am developing an Android application with camera related functionality.
First of all, I read a lot of things about SO, XDA, etc., then please do not redirect me to other useless messages.
I am trying to implement something like "fixed focus mode" so that:
- I launch my application using
FOCUS_MODE_AUTO (or something else); - focus an object at an arbitrary distance;
- lock current focus;
- move the camera to another object at a different distance that is out of focus.
I tried different solutions, i.e.:
mCamera.cancelAutoFocus() in AutoFocusCallback to prevent focus adjustment;- set a
FocusArea : new Camera.Area(new Rect(-50, -50, 50, 50), 1000) to fix the focus on the current area.
I am targeting API 20 and I am working on a Samsung Galaxy S5. Supported focus modes on this device: - auto - infinity - macro - continuous video - continuous image
The recommendation I found more often is to recompile Android ...
source share