CameraDeviceInterop


public interface CameraDeviceInterop

Known direct subclasses

Configures Camera2 android.hardware.camera2.CameraDevice options.

Summary

Public methods

abstract CameraDevice.StateCallback

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

abstract void

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

abstract void

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

Public methods

getDeviceStateCallback

Added in 1.7.0
abstract CameraDevice.StateCallback getDeviceStateCallback()

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:

setDeviceStateCallback

Added in 1.7.0
abstract void setDeviceStateCallback(CameraDevice.StateCallback value)

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:

setDeviceStateCallback

Added in 1.7.0
abstract void setDeviceStateCallback(
    @NonNull Executor executor,
    @NonNull CameraDevice.StateCallback callback
)

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
@NonNull Executor executor

executor to run the callback on

@NonNull CameraDevice.StateCallback callback

device state callback