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

python - How to insert QWidgets in the middle of a Layout? -

python - serve multiple gunicorn django instances under nginx ubuntu -

module - Prestashop displayPaymentReturn hook url -