Data Capture Context Builder

Defined in package com.scandit.datacapture.core.capture

DataCaptureContextBuilder
class DataCaptureContextBuilder

Added in version 6.1.0

A builder for the DataCaptureContext that allows to set additional properties that cannot be set through DataCaptureContext.forLicenseKey().

Note

It’s recommended to use the singleton context available through the static DataCaptureContext.sharedInstance property, and initialize it through the static DataCaptureContext.initialize() method, unless several contexts are specifically needed.

DataCaptureContextBuilder()
DataCaptureContextBuilder(licenseKey: String)

Added in version 6.8.0

Constructs a builder to build a data capture context with additional properties.

deviceName(deviceName)
fun deviceName(deviceName: String?): DataCaptureContextBuilder

Added in version 6.1.0

Sets a device name. The device name allows to optionally identify the device with a user-provided name. This name is then associated with the unique identifier of the device and displayed in the online dashboard.

externalId(externalId)
fun externalId(externalId: String?): DataCaptureContextBuilder

Added in version 6.1.0

Sets an external ID. The external ID is a customer defined identifier that is verified in the license key. This is an optional feature for resellers of the Scandit Data Capture SDK.

settings(settings)
fun settings(settings: DataCaptureContextSettings): DataCaptureContextBuilder

Added in version 6.7.0

Sets additional settings for the context.

build()
fun build(): DataCaptureContext

Added in version 6.1.0

Constructs a data capture context with the properties set on the builder.