public enum

BaseCamera.State

extends java.lang.Enum<BaseCamera.State>

 java.lang.Object

↳java.lang.Enum<BaseCamera.State>

↳androidx.camera.core.BaseCamera.State

Overview

The state of a camera within the process.

The camera state is used to communicate events like when the camera is opening or closing and can be used to determine when it is safe to interact with the camera.

Summary

Enum Constants
CLOSEDCamera has been closed and should not be producing data.
CLOSINGCamera is in the process of closing.
OPENCamera is open and producing (or ready to produce) image data.
OPENINGCamera is in the process of opening.
PENDING_OPENCamera is waiting for resources to become available before opening.
RELEASEDCamera has been closed and has released all held resources.
RELEASINGCamera is in the process of being released and cannot be reopened.
Methods
public static BaseCamera.StatevalueOf(java.lang.String name)

public static BaseCamera.Statevalues()

from java.lang.Enum<E>clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
from java.lang.ObjectgetClass, notify, notifyAll, wait, wait, wait

Enum Constants

PENDING_OPEN

Camera is waiting for resources to become available before opening.

The camera will automatically transition to an BaseCamera.State.OPENING state once resources have become available. Resources are typically made available by other cameras closing.

OPENING

Camera is in the process of opening.

This is a transitive state.

OPEN

Camera is open and producing (or ready to produce) image data.

CLOSING

Camera is in the process of closing.

This is a transitive state.

CLOSED

Camera has been closed and should not be producing data.

RELEASING

Camera is in the process of being released and cannot be reopened.

This is a transitive state.

RELEASED

Camera has been closed and has released all held resources.

Methods

public static BaseCamera.State values()

public static BaseCamera.State valueOf(java.lang.String name)