Builder

interface Builder

Functions

apiToken
Link copied to clipboard
abstract fun apiToken(value: String?): Session.Builder
Uses the provided API token value to associate with Session.
applicationId
Link copied to clipboard
abstract fun applicationId(value: String?): Session.Builder
Uses the provided application ID value to associate with Session.
attachTo
Link copied to clipboard
abstract fun attachTo(viewStub: ViewStub?): Session.Builder
Uses the provided viewStub with a non-null parent view to inflate view hierarchy of Session which includes rendering camera preview with lenses.
abstract fun attachTo(viewStub: ViewStub, withPreview: Boolean): Session.Builder
Uses the provided viewStub with a non-null parent view to inflate view hierarchy of Session.
audioProcessorSource
Link copied to clipboard
abstract fun audioProcessorSource(value: Source<AudioProcessor>): Session.Builder
Uses the provided value to attach the Session audio processing pipeline to once built.
build
Link copied to clipboard
abstract fun build(): Session
Builds an instance of Session with the configuration of this builder and starts the internal lifecycle which can be disposed by calling Session.close.
configureLenses
Link copied to clipboard
abstract fun configureLenses(withBuilder: @JvmSuppressWildcards() Consumer<LensesComponent.Builder>): Session.Builder
Allows to pre-configure LensesComponent with options that are applied to build the final LensesComponent available through Session.lenses.
configureWith
Link copied to clipboard
abstract fun configureWith(key: String, value: String): Session.Builder
Uses the provided key associated with a value to configure additional Session parameters which are typically internal and/or experimental.
handleErrorsWith
Link copied to clipboard
abstract fun handleErrorsWith(errorHandler: Consumer<Throwable>): Session.Builder
Allows to provide a custom error handler that will be notified when this session and/or its sub-components encounter issues that are most likely unrecoverable.
imageProcessorSource
Link copied to clipboard
abstract fun imageProcessorSource(value: Source<ImageProcessor>): Session.Builder
Uses the provided value to attach the Session image processing pipeline to once built.
legalProcessorSource
Link copied to clipboard
abstract fun legalProcessorSource(value: Source<LegalProcessor>): Session.Builder
Uses the provided value to attach the Session legal processing pipeline to once built.
locationProcessorSource
Link copied to clipboard
abstract fun locationProcessorSource(value: Source<LocationProcessor>): Session.Builder
Uses the provided value to attach the Session optional location data processing pipeline to once built.
mediaProcessorSource
Link copied to clipboard
abstract fun mediaProcessorSource(value: Source<MediaProcessor>): Session.Builder
Uses the provided value to attach the Session optional media data processing pipeline to once built.
safeRenderAreaProcessorSource
Link copied to clipboard
abstract fun safeRenderAreaProcessorSource(value: Source<SafeRenderAreaProcessor>): Session.Builder
Uses the provided value to attach the Session optional safe render area processing pipeline to once built.
userProcessorSource
Link copied to clipboard
abstract fun userProcessorSource(value: Source<UserProcessor>): Session.Builder
Uses the provided value to attach the Session optional user data processing pipeline to once built.