CameraState.ErrorType

public enum CameraState.ErrorType


Types of errors the camera can encounter.

CameraX tries to recover from recoverable errors, which include ERROR_CAMERA_IN_USE, ERROR_MAX_CAMERAS_IN_USE and ERROR_OTHER_RECOVERABLE_ERROR. The rest of the errors are critical, and require the intervention of the developer or user to restore camera function. These errors include ERROR_STREAM_CONFIG, ERROR_CAMERA_DISABLED, ERROR_CAMERA_FATAL_ERROR and ERROR_DO_NOT_DISTURB_MODE_ENABLED.

Summary

Enum Values

CRITICAL

An error the camera encountered that CameraX will not attempt to recover from.

RECOVERABLE

An error the camera encountered that CameraX will attempt to recover from.

Public methods

static CameraState.ErrorType

Returns the enum constant of this type with the specified name.

static CameraState.ErrorType[]

Returns an array containing the constants of this enum type, in the order they're declared.

Enum Values

CRITICAL

CameraState.ErrorType CameraState.ErrorType.CRITICAL

An error the camera encountered that CameraX will not attempt to recover from.

A critical error is one that requires the intervention of the developer or user to restore camera function, and includes ERROR_STREAM_CONFIG, ERROR_CAMERA_DISABLED, ERROR_CAMERA_FATAL_ERROR and ERROR_DO_NOT_DISTURB_MODE_ENABLED.

RECOVERABLE

CameraState.ErrorType CameraState.ErrorType.RECOVERABLE

An error the camera encountered that CameraX will attempt to recover from.

Recoverable errors include ERROR_CAMERA_IN_USE, ERROR_MAX_CAMERAS_IN_USE and ERROR_OTHER_RECOVERABLE_ERROR.

Public methods

valueOf

Added in 1.1.0
public static CameraState.ErrorType valueOf(String name)

Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Returns
CameraState.ErrorType

the enum constant with the specified name

Throws
java.lang.IllegalArgumentException

if this enum type has no constant with the specified name

values

Added in 1.1.0
public static CameraState.ErrorType[] values()

Returns an array containing the constants of this enum type, in the order they're declared. This method may be used to iterate over the constants.

Returns
CameraState.ErrorType[]

an array containing the constants of this enum type, in the order they're declared