CameraDeviceManager

Manages available camera devices on the system.

This class observes both:

  • Camera availability changes reported by CameraManager

  • USB camera attach / detach events

and keeps an up-to-date list of CameraDevice instances exposed via deviceList.

Call release when this manager is no longer needed to unregister callbacks and receivers.

Constructors

Link copied to clipboard
constructor(context: Context)

Properties

Link copied to clipboard
val deviceList: StateFlow<List<CameraDevice>>

A read-only StateFlow that emits the current list of available camera devices.

Functions

Link copied to clipboard

Returns the current list of camera devices detected by the system.

Link copied to clipboard
fun release()

Releases all registered callbacks and receivers.