android - Is there an equivalent to the camera 2 API method camera.autoFocus() in the camera API? -


in first camera have such method

private void takepicture() {     camera.autofocus(new camera.autofocuscallback() {          @override         public void onautofocus(boolean success, camera camera) {             camera.takepicture(shuttercallback, picturecallback_raw, picturecallback_jpeg);         }     }); } 

and convinient , when user take picture , app trying focused , take picture...

question : how can implement in camera2api callback or way wait until camera take focus , take picture?

try this sample project google (or camera2basicfragment). in general should request focus, determine "focus lock" state in cameracapturesession.capturecallback capture image , request unlock focus.


Comments

Popular posts from this blog

qt - QML MouseArea onWheel event not working properly when inside QML Scrollview -

java - is not an enclosing class / new Intent Cannot Resolve Constructor -

python - Error importing VideoFileClip from moviepy : AttributeError: 'PermissionError' object has no attribute 'message' -