ConcurrentCamera


class ConcurrentCamera


Concurrent camera is a new feature introduced from Android 11, which supports simultaneous streaming of camera devices, for example, it allows a device to have both the front and back cameras operating at the same time.

A concurrent camera object is returned after binding concurrent cameras to LifecycleOwner. It includes a list of Cameras which are operating at the same time. Before binding to LifecycleOwner, check FEATURE_CAMERA_CONCURRENT to see whether this device is supporting concurrent camera or not.

CameraX currently only supports dual concurrent camera, which allows two cameras operating at the same time, with at most two UseCases bound for each. The max resolution is 720p or 1440p, more details in the following link, see concurrent camera streaming

Summary

Nested types

Configuration for a single camera in concurrent camera mode, including CameraSelector, LifecycleOwner and UseCaseGroup.

Public constructors

Constructor of concurrent cameras.

Public functions

(Mutable)List<Camera!>

Gets the list of cameras.

Public constructors

ConcurrentCamera

Added in 1.3.0
ConcurrentCamera(cameras: (Mutable)List<Camera!>)

Constructor of concurrent cameras.

Parameters
cameras: (Mutable)List<Camera!>

list of Camera.

Public functions

getCameras

Added in 1.3.0
fun getCameras(): (Mutable)List<Camera!>

Gets the list of cameras.