public enum

CameraInternal.State

extends java.lang.Enum<CameraInternal.State>

 java.lang.Object

↳java.lang.Enum<CameraInternal.State>

↳androidx.camera.core.impl.CameraInternal.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.
CONFIGUREDCamera is open and capture session is configured.
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 CameraInternal.StatevalueOf(java.lang.String name)

public static CameraInternal.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

RELEASED

Camera has been closed and has released all held resources.

RELEASING

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

This is a transient state. Note that this state holds a camera slot even though the implementation may not actually hold camera resources.

CLOSED

Camera has been closed and should not be producing data.

PENDING_OPEN

Camera is waiting for resources to become available before opening.

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

CLOSING

Camera is in the process of closing.

This is a transient state.

OPENING

Camera is in the process of opening.

This is a transient state.

OPEN

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

CONFIGURED

Camera is open and capture session is configured. This state is only used for concurrent camera.

In concurrent mode, CONFIGURED refers to camera is opened and capture session is configured, to differentiate from OPEN, which refers to camera device is opened but capture session is not configured yet. External users will only see OPEN state, no matter the internal state is CONFIGURED or OPEN.

Methods

public static CameraInternal.State values()

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