CameraDeviceInterop


interface CameraDeviceInterop

Known direct subclasses

Configures Camera2 android.hardware.camera2.CameraDevice options.

Summary

Public functions

Unit
setDeviceStateCallback(
    executor: Executor,
    callback: CameraDevice.StateCallback
)

Sets the callback to receive camera device state updates with an executor.

Public properties

CameraDevice.StateCallback?

The callback to receive camera device state updates on a direct executor.

Public functions

setDeviceStateCallback

Added in 1.7.0-rc01
fun setDeviceStateCallback(
    executor: Executor,
    callback: CameraDevice.StateCallback
): Unit

Sets the callback to receive camera device state updates with an executor.

Warning: The callback receives raw android.hardware.camera2.CameraDevice instances. Directly invoking state-altering, lifecycle, or session-creation methods on these raw objects bypasses CameraX pipeline management and causes state desynchronization, stream interruption, or crashes. Do not invoke:

Parameters
executor: Executor

executor to run the callback on

callback: CameraDevice.StateCallback

device state callback

Public properties

deviceStateCallback

Added in 1.7.0-rc01
var deviceStateCallback: CameraDevice.StateCallback?

The callback to receive camera device state updates on a direct executor.

Warning: The callback receives raw android.hardware.camera2.CameraDevice instances. Directly invoking state-altering, lifecycle, or session-creation methods on these raw objects bypasses CameraX pipeline management and causes state desynchronization, stream interruption, or crashes. Do not invoke: