The Android Developer Challenge is back! Submit your idea before December 2.

CameraControl

public interface CameraControl

androidx.camera.core.CameraControl


An interface for controlling camera's zoom, focus and metering across all use cases.

Applications can retrieve the interface via CameraX.getCameraControl.

Summary

Public methods

abstract void cancelFocusAndMetering()

Cancels current FocusMeteringAction.

abstract void startFocusAndMetering(FocusMeteringAction action)

Starts a focus and metering action by the FocusMeteringAction.

Public methods

cancelFocusAndMetering

public abstract void cancelFocusAndMetering ()

Cancels current FocusMeteringAction.

It clears the 3A regions and update current AF mode to CONTINOUS AF (if supported). If auto-focus does not completes, it will notify the FocusMeteringAction.OnAutoFocusListener with isFocusLocked set to false.

startFocusAndMetering

public abstract void startFocusAndMetering (FocusMeteringAction action)

Starts a focus and metering action by the FocusMeteringAction. The FocusMeteringAction contains the configuration of multiple 3A MeteringPoints, auto-cancel duration andFocusMeteringAction.OnAutoFocusListener to receive the auto-focus result. Check FocusMeteringAction for more details.

Parameters
action FocusMeteringAction: the FocusMeteringAction to be executed.