CameraInfo

public interface CameraInfo

androidx.camera.core.CameraInfo


An interface for retrieving camera information.

Applications can retrieve an instance via Camera.getCameraInfo().

Summary

Public methods

abstract CameraSelector getCameraSelector()

Returns a CameraSelector unique to this camera.

abstract LiveData<CameraState> getCameraState()

Returns a LiveData of the camera's state.

abstract ExposureState getExposureState()

Returns a ExposureState.

abstract int getSensorRotationDegrees()

Returns the sensor rotation in degrees, relative to the device's "natural" (default) orientation.

abstract int getSensorRotationDegrees(int relativeRotation)

Returns the sensor rotation, in degrees, relative to the given rotation value.

abstract LiveData<Integer> getTorchState()

Returns a LiveData of current TorchState.

abstract LiveData<ZoomState> getZoomState()

Returns a LiveData of ZoomState.

abstract boolean hasFlashUnit()

Returns if flash unit is available or not.

default boolean isFocusMeteringSupported(FocusMeteringAction action)

Returns if the given FocusMeteringAction is supported on the devices.

Public methods

getCameraSelector

public abstract CameraSelector getCameraSelector ()

Returns a CameraSelector unique to this camera.

Returns
CameraSelector CameraSelector unique to this camera.

getCameraState

public abstract LiveData<CameraState> getCameraState ()

Returns a LiveData of the camera's state.

The LiveData will be updated whenever the camera's state changes, and can be any of the following: