CameraUnavailableException

public class CameraUnavailableException
extends Exception

java.lang.Object
   ↳ java.lang.Throwable
     ↳ java.lang.Exception
       ↳ androidx.camera.core.CameraUnavailableException


CameraUnavailableException is thrown when a camera device could not be queried or opened or if the connection to an opened camera device is no longer valid.

Summary

Constants

int CAMERA_DISABLED

The camera is disabled due to a device policy, and cannot be opened.

int CAMERA_DISCONNECTED

The camera device is removable and has been disconnected from the Android device, or the camera service has shut down the connection due to a higher-priority access request for the camera device.

int CAMERA_ERROR

The camera device is currently in the error state.

int CAMERA_IN_USE

The camera device is in use already.

int CAMERA_MAX_IN_USE

The system-wide limit for number of open cameras or camera resources has been reached, and more camera devices cannot be opened.

int CAMERA_UNAVAILABLE_DO_NOT_DISTURB

The camera is unavailable due to NotificationManager.Policy.

int CAMERA_UNKNOWN_ERROR

Some other error occurred.

Public constructors

CameraUnavailableException(int reason)
CameraUnavailableException(int reason, String message)
CameraUnavailableException(int reason, String message, Throwable cause)
CameraUnavailableException(int reason, Throwable cause)

Public methods

int getReason()

The reason the camera is unavailable.

Inherited methods