UseCaseGroup.Builder


public final class UseCaseGroup.Builder


A builder for generating UseCaseGroup.

Summary

Public constructors

Public methods

@NonNull UseCaseGroup.Builder

Adds a CameraEffect to the collection.

@NonNull UseCaseGroup.Builder

Adds UseCase to the collection.

@NonNull UseCaseGroup

Builds a UseCaseGroup from the current state.

@NonNull UseCaseGroup.Builder

Sets ViewPort shared by the UseCases.

Public constructors

Builder

Added in 1.0.0
public Builder()

Public methods

addEffect

Added in 1.3.0
public @NonNull UseCaseGroup.Builder addEffect(@NonNull CameraEffect cameraEffect)

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
public @NonNull UseCaseGroup.Builder addUseCase(@NonNull UseCase useCase)

Adds UseCase to the collection.

build

Added in 1.0.0
public @NonNull UseCaseGroup build()

Builds a UseCaseGroup from the current state.

setViewPort

Added in 1.0.0
public @NonNull UseCaseGroup.Builder setViewPort(@NonNull ViewPort viewPort)

Sets ViewPort shared by the UseCases.