CameraUnavailableException
class CameraUnavailableException : Exception
| kotlin.Any | |||
| ↳ | kotlin.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 |
|
|---|---|
const Int |
CAMERA_DISABLED = 1The camera is disabled due to a device policy, and cannot be opened. |
const Int |
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. |
const Int |
CAMERA_ERROR = 3The camera device is currently in the error state. |
const Int |
CAMERA_IN_USE = 4The camera device is in use already. |
const Int |
The system-wide limit for number of open cameras or camera resources has been reached, and more camera devices cannot be opened. |
const Int |
The camera is unavailable due to |
const Int |
Some other error occurred. |
Public constructors |
|---|
CameraUnavailableException(reason: Int) |
CameraUnavailableException(reason: Int, cause: Throwable?) |
CameraUnavailableException(reason: Int, message: String?) |
CameraUnavailableException(reason: Int, message: String?, cause: Throwable?) |
Inherited functions |
||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
Constants
CAMERA_DISABLED
const val CAMERA_DISABLED = 1: Int
The camera is disabled due to a device policy, and cannot be opened.
CAMERA_DISCONNECTED
const val CAMERA_DISCONNECTED = 2: Int
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.
CAMERA_ERROR
const val CAMERA_ERROR = 3: Int
The camera device is currently in the error state.
The camera has failed to open or has failed at a later time as a result of some non-user interaction.
CAMERA_MAX_IN_USE
const val CAMERA_MAX_IN_USE = 5: Int
The system-wide limit for number of open cameras or camera resources has been reached, and more camera devices cannot be opened.
CAMERA_UNAVAILABLE_DO_NOT_DISTURB
const val CAMERA_UNAVAILABLE_DO_NOT_DISTURB = 6: Int
The camera is unavailable due to NotificationManager.Policy. Some API 28 devices cannot access the camera when the device is in "Do Not Disturb" mode. The camera will not be accessible until "Do Not Disturb" mode is disabled.
CAMERA_UNKNOWN_ERROR
const val CAMERA_UNKNOWN_ERROR = 0: Int
Some other error occurred.
Public constructors
CameraUnavailableException
CameraUnavailableException(reason: Int, cause: Throwable?)
CameraUnavailableException
CameraUnavailableException(reason: Int, message: String?, cause: Throwable?)