CameraInfo.cameraState stop working on CameraX 1.5.0

10 views
Skip to first unread message

Eugene B

unread,
Sep 26, 2025, 12:37:41 PM (yesterday) Sep 26
to Android CameraX Discussion Group
Hi,

We are experiencing a regression in the CameraState observation behavior when upgrading from CameraX 1.5.0-alpha04 to the stable 1.5.0 release.

In our application, we observe the camera's state to track its lifecycle. The following code worked as expected in version 1.5.0-alpha04:

cameraState?.observe(lifecycleOwner) { state ->
    Log.d(TAG, "Camera state = $state")
    // Handle state changing
}

Previous Behavior (1.5.0-alpha04):
The state flow consistently transitioned through CLOSED -> OPENING -> OPEN when the camera was successfully opened.

Current Behavior (1.5.0):
The state now often gets stuck at OPENING. The OPEN state is rarely emitted, even though the camera is fully functional (a preview stream is active, and capture sessions work correctly). This breaks our logic that relies on confirming the camera is fully open.

Question:

Is this a known issue in the stable 1.5.0 release?

If so, is there a known workaround to reliably get the OPEN state event?
Reply all
Reply to author
Forward
0 new messages