public final class

UseCaseGroup.Builder

extends java.lang.Object

 java.lang.Object

↳androidx.camera.core.UseCaseGroup.Builder

Overview

A builder for generating UseCaseGroup.

Summary

Constructors
publicBuilder()

Methods
public UseCaseGroup.BuilderaddEffect(CameraEffect cameraEffect)

Adds a CameraEffect to the collection.

public UseCaseGroup.BuilderaddUseCase(UseCase useCase)

Adds UseCase to the collection.

public UseCaseGroupbuild()

Builds a UseCaseGroup from the current state.

public UseCaseGroup.BuildersetViewPort(ViewPort viewPort)

Sets ViewPort shared by the UseCases.

from java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructors

public Builder()

Methods

public UseCaseGroup.Builder setViewPort(ViewPort viewPort)

Sets ViewPort shared by the UseCases.

public UseCaseGroup.Builder addEffect(CameraEffect cameraEffect)

Adds a CameraEffect to the collection.

The value of CameraEffect.getTargets() must be one of the supported values below:

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

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

public UseCaseGroup.Builder addUseCase(UseCase useCase)

Adds UseCase to the collection.

public UseCaseGroup build()

Builds a UseCaseGroup from the current state.