Autofocus in a custom camera I use a custom camera in the application (android.hardware.camera2.CameraManager). You need to adjust the focus. Who faced this? Maybe there is a library that does it?

  • so you need to manually set the focus, or do autofocus? - Vladyslav Matviienko
  • Preferred autofocus - Dmitry Alexandrov
  • The Camera object has a method, something like focus (). But no one knows how you work with the camera, so no one will tell you exactly how to autofocus - Vladyslav Matviienko
  • Corrected the issue. Camera android.hardware.camera2.Camera - Dmitry Alexandrov
  • The android.hardware.camera2.Camera class does not exist. There is only android.hardware.Camera - Vladyslav Matviienko

1 answer 1

The Camera class has an autoFocus method that accepts a callback at the end of the focus. You can use it.