focusTo
Focuses the Camera pipeline to the given point, using the MeteringModes of options (by default, every mode the device supports, ideally 3A: AE, AF and AWB).
Suspends until focusing has fully settled, and throws if it timed out or was canceled. A focus operation is canceled by calling focusTo again, or resetFocus.
After settling, the pipeline either keeps the point in focus as the scene changes (SceneAdaptiveness.CONTINUOUS), or locks the values in place (SceneAdaptiveness.LOCKED).
val point = VisionCamera.createNormalizedMeteringPoint(0.5, 0.5)
controller.focusTo(point, FocusOptions(responsiveness = FocusResponsiveness.STEADY))Content copied to clipboard
Throws
If the device does not support metering for one of the requested modes (see CameraDevice.supportsFocusMetering, CameraDevice.supportsExposureMetering and CameraDevice.supportsWhiteBalanceMetering).