UseCaseGroup.Builder


class UseCaseGroup.Builder


A builder for generating UseCaseGroup.

Summary

Public constructors

Public functions

UseCaseGroup.Builder
addEffect(cameraEffect: CameraEffect)

Adds a CameraEffect to the collection.

UseCaseGroup.Builder
addUseCase(useCase: UseCase)

Adds UseCase to the collection.

UseCaseGroup

Builds a UseCaseGroup from the current state.

UseCaseGroup.Builder
setViewPort(viewPort: ViewPort)

Sets ViewPort shared by the UseCases.

Public constructors

Builder

Added in 1.0.0
Builder()

Public functions

addEffect

Added in 1.3.0
fun addEffect(cameraEffect: CameraEffect): UseCaseGroup.Builder

Adds a CameraEffect to the collection.

The value of getTargets must be one of the supported values below:

The targets must be mutually exclusive of each other, otherwise, the build method will throw IllegalArgumentException. For example, it's invalid to have one CameraEffect with target PREVIEW and another CameraEffect with target PREVIEW | VIDEO_CAPTURE, since they both target Preview.

Once added, CameraX will use the CameraEffects to process the outputs of the UseCases.

addUseCase

Added in 1.0.0
fun addUseCase(useCase: UseCase): UseCaseGroup.Builder

Adds UseCase to the collection.

build

Added in 1.0.0
fun build(): UseCaseGroup

Builds a UseCaseGroup from the current state.

setViewPort

Added in 1.0.0
fun setViewPort(viewPort: ViewPort): UseCaseGroup.Builder

Sets ViewPort shared by the UseCases.