how to realize Android Camera Focusing (Continuous) like a Built-in Camera
android, autofocus, camera, java
Solution
Both FOCUS_MODE_CONTINUOUS_PICTURE and FOCUS_MODE_CONTINUOUS_VIDEO seem not working properly on Samsung latest devices, such as S5, however, it could use FOCUS_MODE_AUTO and manually trigger setAutofocus by sensor changes, touches, or brightness changes.
Problem
I've made Camera App like Built-in Camera. I want to implement function that continuous focusing like a Built-in Camera's it. (this function what i do not touch screen but camera try to focusing itself. ) So, Setting this where surfaceCreated : ``` Camera.Parameters parameters = mCamera.getParameters(); parameters.setFocusMode(Camera.Parameters.FOCUS_MODE_CONTINUOUS_PICTURE); mCamera.setParameters(parameters); ``` and called Method : ``` private void setAutoFocusMoveCallback(Camera camera, AutoFocusMoveCallback cb) { System.out.println("setAutoFocusMoveCallback : Check " + cb.toString()); mCamera.cancelAutoFocus(); camera.setAutoFocusMoveCallback(cb); } ``` but this method is not work on Samsung Galaxy S4, S5, Note3. but another smart phone worked! So, I want to find another method! (um... I do not understand why Samsung Galaxy S4, S5, Note3 is not work.. ) Please help me. please coach another method :)