CameraState.ErrorType

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 functions

java-static CameraState.ErrorType!
valueOf(name: String!)

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

java-static Array<CameraState.ErrorType!>!

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

Enum Values

CRITICAL

val CameraState.ErrorType.CRITICALCameraState.ErrorType

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

val CameraState.ErrorType.RECOVERABLECameraState.ErrorType

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 functions

valueOf

Added in 1.1.0
java-static fun valueOf(name: String!): CameraState.ErrorType!

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
java-static fun values(): Array<CameraState.ErrorType!>!

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
Array<CameraState.ErrorType!>!

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