CameraDeviceCompat

class CameraDeviceCompat
kotlin.Any
   ↳ androidx.camera.camera2.impl.compat.CameraDeviceCompat

Helper for accessing features in CameraDevice in a backwards compatible fashion.

Summary

Public methods

static Unit
createCaptureSession(@NonNull device: CameraDevice, @NonNull config: SessionConfigurationCompat)

Create a new CameraCaptureSession using a SessionConfigurationCompat helper object that aggregates all supported parameters.

Public methods

createCaptureSession

static fun createCaptureSession(@NonNull device: CameraDevice, @NonNull config: SessionConfigurationCompat): Unit

Create a new CameraCaptureSession using a SessionConfigurationCompat helper object that aggregates all supported parameters.

Parameters
device CameraDevice: The CameraDevice used to create the capture session.
config CameraDevice: A session configuration (see SessionConfigurationCompat).
Exceptions
IllegalArgumentException In case the session configuration is invalid; or the output configurations are empty; or the session configuration executor is invalid.
CameraAccessException In case the camera device is no longer connected or has encountered a fatal error.