public final class

AppConfig.Builder

extends java.lang.Object

implements TargetConfig.Builder<CameraX, AppConfig.Builder>, Config.ExtendableBuilder

 java.lang.Object

↳androidx.camera.core.AppConfig.Builder

Overview

A builder for generating AppConfig objects.

Summary

Constructors
publicBuilder()

Creates a new Builder object.

Methods
public AppConfigbuild()

Builds an immutable AppConfig from the current state.

public static AppConfig.BuilderfromConfig(Config configuration)

Generates a Builder from another Config object

public MutableConfiggetMutableConfig()

public AppConfig.BuildersetCameraFactory(CameraFactory cameraFactory)

Sets the CameraFactory implementation for the application.

public AppConfig.BuildersetDeviceSurfaceManager(CameraDeviceSurfaceManager repository)

Sets the CameraDeviceSurfaceManager implementation for the application.

public AppConfig.BuildersetTargetClass(java.lang.Class<CameraX> targetClass)

public AppConfig.BuildersetTargetName(java.lang.String targetName)

public AppConfig.BuildersetUseCaseConfigFactory(UseCaseConfigFactory repository)

Sets the UseCaseConfigFactory implementation for the application.

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

Constructors

public Builder()

Creates a new Builder object.

Methods

public static AppConfig.Builder fromConfig(Config configuration)

Generates a Builder from another Config object

Parameters:

configuration: An immutable configuration to pre-populate this builder.

Returns:

The new Builder.

public AppConfig.Builder setCameraFactory(CameraFactory cameraFactory)

Sets the CameraFactory implementation for the application.

public AppConfig.Builder setDeviceSurfaceManager(CameraDeviceSurfaceManager repository)

Sets the CameraDeviceSurfaceManager implementation for the application.

public AppConfig.Builder setUseCaseConfigFactory(UseCaseConfigFactory repository)

Sets the UseCaseConfigFactory implementation for the application.

This factory should produce all default configurations for the application's use cases.

public MutableConfig getMutableConfig()

public AppConfig build()

Builds an immutable AppConfig from the current state.

Returns:

A AppConfig populated with the current state.

public AppConfig.Builder setTargetClass(java.lang.Class<CameraX> targetClass)

public AppConfig.Builder setTargetName(java.lang.String targetName)