SdkConfiguration

data class SdkConfiguration(var licenseKey: String, var loggingEnabled: Boolean = false, var enableNativeLogging: Boolean = false, var storageBaseDirectory: String? = null, var storageImageQuality: Int = 80, var storageImageFormat: StorageImageFormat = StorageImageFormat.JPG, var fileEncryptionMode: FileEncryptionMode? = null, var fileEncryptionPassword: String? = null, var performanceHintApi: Boolean = true, var allowGpuAcceleration: Boolean = true, var allowXnnpackAcceleration: Boolean = true)

Initialize configuration for the Scanbot SDK.

Constructors

Link copied to clipboard
constructor(licenseKey: String, loggingEnabled: Boolean = false, enableNativeLogging: Boolean = false, storageBaseDirectory: String? = null, storageImageQuality: Int = 80, storageImageFormat: StorageImageFormat = StorageImageFormat.JPG, fileEncryptionMode: FileEncryptionMode? = null, fileEncryptionPassword: String? = null, performanceHintApi: Boolean = true, allowGpuAcceleration: Boolean = true, allowXnnpackAcceleration: Boolean = true)
constructor(source: Map<String, Any?>)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard

If set to true, GPU Acceleration will be enabled for Barcode Scanner, Document Scanner and Generic Document Recognizer (Android only).

Link copied to clipboard

Enables/disables XNNPACK acceleration for TensorFlow ML models, which provides highly optimized implementations of floating-point neural network operators (Android only).

Link copied to clipboard

Optional boolean flag that enables Scanbot SDK Core native logging (default is false, Android only).

Link copied to clipboard

Optional file encryption mode, 'AES128' or 'AES256'.

Link copied to clipboard

Optional file encryption password. Refer to the section "Storage Encryption" for more details.

Link copied to clipboard

Your license key for the Scanbot SDK. See the "License Key" section below.

Link copied to clipboard

Optional boolean flag to enable logging. See the "Logging" section below.

Link copied to clipboard

If set to true, PerformanceHintApi is enabled, which lead to increase of performance due of increased use of top CPU cores (Android only), also increase battery usage.

Link copied to clipboard

Optional directory as file URI to override the default storage base directory of the Scanbot SDK. Refer to the section "Storage" for more details.

Link copied to clipboard

Optional image format, either 'JPG' or 'PNG'. The recommended default value is 'JPG'. Please note that 'PNG' will result in larger image files! Also, the storageImageQuality value does not apply for 'PNG'.

Link copied to clipboard

Optional image quality value. It defines the quality factor of JPEG images. The value must be between 1 and 100, where 100 means maximum quality and largest file size. The recommended default value is 80 which is a good compromise between image file size and document legibility.

Functions

Link copied to clipboard
fun toJson(config: ToJsonConfiguration = ToJsonConfiguration.default()): JsonObject
Link copied to clipboard
fun toJsonString(config: ToJsonConfiguration = ToJsonConfiguration.default()): String