enablePreview

fun enablePreview(viewport: ViewPort? = null)

Arms the live preview for later start calls.

The next session binds a CameraX Preview next to analysis and publishes its SurfaceRequest on surfaceRequest. Call it before start. Preview stays armed for the life of the scanner.

Since

0.5.0

Parameters

viewport

when set, preview and analysis bind in one UseCaseGroup with this ViewPort and crop the same sensor region. When null (the default), their crops can differ.