Config.Builder


public final class Config.Builder


This class can be used to create a Config instance.

Apps can create a default Builder object and then call the appropriate setter methods on the builder to specify any non-default settings. Default settings for each configuration parameter are specified for each setter method. Setters return the builder object so that setter methods can be chained. Builder.build can be used to create a Config with the configuration specified in the builder.

Summary

Public constructors

Creates a Builder instance for a Config with default values.

Creates a Builder instance with the same configuration settings as the provided Config.

Public methods

final @NonNull Config

Creates a new instance of Config with the configuration specified in this instance.

final @NonNull Config.Builder

Sets the AnchorPersistenceMode this Builder instance will use to build a Config.

final @NonNull Config.Builder
setAugmentedImageDatabase(
    AugmentedImageDatabase augmentedImageDatabase
)

Sets the AugmentedImageDatabase this Builder instance will use to build a Config.

final @NonNull Config.Builder

Sets the augmented object categories this Builder instance will use to build a Config.

final @NonNull Config.Builder

Sets the DepthEstimationMode this Builder instance will use to build a Config.

final @NonNull Config.Builder

Sets the DeviceTrackingMode this Builder instance will use to build a Config.

final @NonNull Config.Builder

Sets the EyeTrackingMode this Builder instance will use to build a Config.

final @NonNull Config.Builder

Sets the FaceTrackingMode this Builder instance will use to build a Config.

final @NonNull Config.Builder

Sets the GeospatialMode this Builder instance will use to build a Config.

final @NonNull Config.Builder

Sets the HandTrackingMode this Builder instance will use to build a Config.

final @NonNull Config.Builder

Sets the PlaneTrackingMode this Builder instance will use to build a Config.

final @NonNull Config.Builder
setQrCodeSizeMeters(float qrCodeSizeMeters)

Sets the QR code size this Builder instance will use to build a Config.

final @NonNull Config.Builder

Sets the QrCodeTrackingMode this Builder instance will use to build a Config.

Public constructors

Builder

Added in 1.0.0-alpha15
public Builder()

Creates a Builder instance for a Config with default values.

Builder

Added in 1.0.0-alpha15
public Builder(@NonNull Config config)

Creates a Builder instance with the same configuration settings as the provided Config.

Parameters
@NonNull Config config

the configuration for the Builder instance

Public methods

build

Added in 1.0.0-alpha15
public final @NonNull Config build()

Creates a new instance of Config with the configuration specified in this instance.

setAnchorPersistence

Added in 1.0.0-alpha15
public final @NonNull Config.Builder setAnchorPersistence(@NonNull AnchorPersistenceMode anchorPersistence)

Sets the AnchorPersistenceMode this Builder instance will use to build a Config.

The default value is AnchorPersistenceMode.DISABLED.

Parameters
@NonNull AnchorPersistenceMode anchorPersistence

AnchorPersistenceMode value to configure the Session

Returns
@NonNull Config.Builder

a Builder that builds a Config with the supplied anchor persistence mode

setAugmentedImageDatabase

Added in 1.0.0-alpha15
public final @NonNull Config.Builder setAugmentedImageDatabase(
    AugmentedImageDatabase augmentedImageDatabase
)

Sets the AugmentedImageDatabase this Builder instance will use to build a Config.

The default value is null.

Parameters
AugmentedImageDatabase augmentedImageDatabase

Nullable AugmentedImageDatabase value to configure the Session

Returns
@NonNull Config.Builder

a Builder that builds a Config with the supplied augmented image database

setAugmentedObjectCategories

Added in 1.0.0-alpha15
public final @NonNull Config.Builder setAugmentedObjectCategories(
    @NonNull Set<@NonNull AugmentedObjectCategory> augmentedObjectCategories
)

Sets the augmented object categories this Builder instance will use to build a Config.

The default value is an empty set.

Parameters
@NonNull Set<@NonNull AugmentedObjectCategory> augmentedObjectCategories

AugmentedObjectCategory set to configure the Session

Returns
@NonNull Config.Builder

a Builder that builds a Config with the supplied AugmentedObjectCategory set

setDepthEstimation

Added in 1.0.0-alpha15
public final @NonNull Config.Builder setDepthEstimation(@NonNull DepthEstimationMode depthEstimation)

Sets the DepthEstimationMode this Builder instance will use to build a Config.

The default value is DepthEstimationMode.DISABLED.

Parameters
@NonNull DepthEstimationMode depthEstimation

DepthEstimationMode value to configure the Session

Returns
@NonNull Config.Builder

a Builder that builds a Config with the supplied depth estimation mode

setDeviceTracking

Added in 1.0.0-alpha15
public final @NonNull Config.Builder setDeviceTracking(@NonNull DeviceTrackingMode deviceTracking)

Sets the DeviceTrackingMode this Builder instance will use to build a Config.

The default value is DeviceTrackingMode.DISABLED.

Parameters
@NonNull DeviceTrackingMode deviceTracking

DeviceTrackingMode value to configure the Session

Returns
@NonNull Config.Builder

a Builder that builds a Config with the supplied device tracking mode

setEyeTracking

Added in 1.0.0-alpha15
public final @NonNull Config.Builder setEyeTracking(@NonNull EyeTrackingMode eyeTracking)

Sets the EyeTrackingMode this Builder instance will use to build a Config.

The default value is EyeTrackingMode.DISABLED.

Parameters
@NonNull EyeTrackingMode eyeTracking

EyeTrackingMode value to configure the Session

Returns
@NonNull Config.Builder

a Builder that builds a Config with the supplied eye tracking mode

setFaceTracking

Added in 1.0.0-alpha15
public final @NonNull Config.Builder setFaceTracking(@NonNull FaceTrackingMode faceTracking)

Sets the FaceTrackingMode this Builder instance will use to build a Config.

The default value is FaceTrackingMode.DISABLED.

Parameters
@NonNull FaceTrackingMode faceTracking

FaceTrackingMode value to configure the Session

Returns
@NonNull Config.Builder

a Builder that builds a Config with the supplied face tracking mode

setGeospatial

Added in 1.0.0-alpha15
public final @NonNull Config.Builder setGeospatial(@NonNull GeospatialMode geospatial)

Sets the GeospatialMode this Builder instance will use to build a Config.

The default value is GeospatialMode.DISABLED.

Parameters
@NonNull GeospatialMode geospatial

GeospatialMode value to configure the Session

Returns
@NonNull Config.Builder

a Builder that builds a Config with the supplied geospatial mode

setHandTracking

Added in 1.0.0-alpha15
public final @NonNull Config.Builder setHandTracking(@NonNull HandTrackingMode handTracking)

Sets the HandTrackingMode this Builder instance will use to build a Config.

The default value is HandTrackingMode.DISABLED.

Parameters
@NonNull HandTrackingMode handTracking

HandTrackingMode value to configure the Session

Returns
@NonNull Config.Builder

a Builder that builds a Config with the supplied hand tracking mode

setPlaneTracking

Added in 1.0.0-alpha15
public final @NonNull Config.Builder setPlaneTracking(@NonNull PlaneTrackingMode planeTracking)

Sets the PlaneTrackingMode this Builder instance will use to build a Config.

The default value is PlaneTrackingMode.DISABLED.

Parameters
@NonNull PlaneTrackingMode planeTracking

PlaneTrackingMode value to configure the Session

Returns
@NonNull Config.Builder

a Builder that builds a Config with the supplied plane tracking mode

setQrCodeSizeMeters

Added in 1.0.0-alpha15
public final @NonNull Config.Builder setQrCodeSizeMeters(float qrCodeSizeMeters)

Sets the QR code size this Builder instance will use to build a Config.

The default value is 0.0, indicating that the system should attempt to estimate the QR code size.

Parameters
float qrCodeSizeMeters

size of QR code to configure the Session

Returns
@NonNull Config.Builder

a Builder that builds a Config with the supplied QR code size

setQrCodeTracking

Added in 1.0.0-alpha15
public final @NonNull Config.Builder setQrCodeTracking(@NonNull QrCodeTrackingMode qrCodeTracking)

Sets the QrCodeTrackingMode this Builder instance will use to build a Config.

The default value is QrCodeTrackingMode.DISABLED.

Parameters
@NonNull QrCodeTrackingMode qrCodeTracking

QrCodeTrackingMode value configure the Session

Returns
@NonNull Config.Builder

a Builder that builds a Config with the supplied QR code tracking mode