Package-level declarations

Types

Link copied to clipboard
data class ActionBarConfiguration(var flashButton: RoundButton = RoundButton( visible = true, backgroundColor = ScanbotColor("?sbColorSurfaceHigh", isArgb = false), foregroundColor = ScanbotColor("?sbColorOnPrimary", isArgb = false), activeBackgroundColor = ScanbotColor("?sbColorWarning", isArgb = false), activeForegroundColor = ScanbotColor("#1C1B1F", isArgb = false) ), var zoomButton: RoundButton = RoundButton( visible = true, backgroundColor = ScanbotColor("?sbColorSurfaceHigh", isArgb = false), foregroundColor = ScanbotColor("?sbColorOnPrimary", isArgb = false), activeBackgroundColor = ScanbotColor("?sbColorSurfaceHigh", isArgb = false), activeForegroundColor = ScanbotColor("?sbColorOnPrimary", isArgb = false) ), var flipCameraButton: RoundButton = RoundButton( visible = true, backgroundColor = ScanbotColor("?sbColorSurfaceHigh", isArgb = false), foregroundColor = ScanbotColor("?sbColorOnPrimary", isArgb = false), activeBackgroundColor = ScanbotColor("?sbColorSurfaceHigh", isArgb = false), activeForegroundColor = ScanbotColor("?sbColorOnPrimary", isArgb = false) ))

Configuration of the buttons available in the action bar.

Link copied to clipboard
data class AspectRatio(var width: Double = 1.0, var height: Double = 1.0)

Configuration of the finder's aspect ratio.

Link copied to clipboard
data class BackgroundStyle(var strokeColor: ScanbotColor = ScanbotColor("#FFFFFFFF", isArgb = false), var fillColor: ScanbotColor = ScanbotColor("#FFFFFF30", isArgb = false), var strokeWidth: Double = 2.0)

Appearance of the polygon used for buttons and hint backgrounds.

Link copied to clipboard
data class BadgedButton(var badgeBackgroundColor: ScanbotColor = ScanbotColor("#FFFFFF", isArgb = false), var badgeForegroundColor: ScanbotColor = ScanbotColor("#C8193C", isArgb = false), var visible: Boolean = true, var backgroundColor: ScanbotColor = ScanbotColor("#0000007A", isArgb = false), var foregroundColor: ScanbotColor = ScanbotColor("#FFFFFF", isArgb = false), var activeBackgroundColor: ScanbotColor = ScanbotColor("#FFCE5C", isArgb = false), var activeForegroundColor: ScanbotColor = ScanbotColor("#1C1B1F", isArgb = false))

Configuration of the round button with badge.

Link copied to clipboard
data class BadgeStyle(var visible: Boolean = true, var background: BackgroundStyle = BackgroundStyle( ), var foregroundColor: ScanbotColor = ScanbotColor("?sbColorOnSurface", isArgb = false))

Configuration of the round button.

Link copied to clipboard
data class BarButtonConfiguration(var visible: Boolean = true, var title: StyledText = StyledText( ), var accessibilityDescription: String = "", var background: BackgroundStyle = BackgroundStyle( ), var icon: IconStyle = IconStyle( ))

Button configuration.

Link copied to clipboard
data class ButtonConfiguration(var visible: Boolean = true, var text: String = "", var accessibilityDescription: String = "", var background: BackgroundStyle = BackgroundStyle( ), var foreground: ForegroundStyle = ForegroundStyle( ))

Button configuration.

Link copied to clipboard
data class CameraConfiguration(var cameraModule: CameraModule = CameraModule.BACK, var zoomSteps: List<Double> = listOf( 1.0, 2.0, 5.0 ), var defaultZoomFactor: Double = 1.0, var flashEnabled: Boolean = false, var minFocusDistanceLock: Boolean = false, var touchToFocusEnabled: Boolean = false, var pinchToZoomEnabled: Boolean = true, var orientationLockMode: OrientationLockMode = OrientationLockMode.NONE, var cameraPreviewMode: CameraPreviewMode = CameraPreviewMode.FILL_IN)

Configuration of the camera settings to be used while scanning.

Link copied to clipboard

Determine which camera module to use on start-up.

Link copied to clipboard
data class CameraPermissionScreen(var statusBarMode: StatusBarMode = StatusBarMode.DARK, var background: ScanbotColor = ScanbotColor("?sbColorSurface", isArgb = false), var iconBackground: ScanbotColor = ScanbotColor("?sbColorOutline", isArgb = false), var icon: IconStyle = IconStyle( visible = true, color = ScanbotColor("?sbColorOnSurface", isArgb = false) ), var enableCameraButton: ButtonConfiguration = ButtonConfiguration( text = "Grant permission", background = BackgroundStyle( strokeColor = ScanbotColor("?sbColorPrimary", isArgb = false), fillColor = ScanbotColor("?sbColorPrimary", isArgb = false), strokeWidth = 0.0 ), foreground = ForegroundStyle( iconVisible = false, color = ScanbotColor("?sbColorOnPrimary", isArgb = false), useShadow = false ) ), var closeButton: ButtonConfiguration = ButtonConfiguration( text = "Close", background = BackgroundStyle( strokeColor = ScanbotColor("#00000000", isArgb = false), fillColor = ScanbotColor("#00000000", isArgb = false), strokeWidth = 0.0 ), foreground = ForegroundStyle( iconVisible = false, color = ScanbotColor("?sbColorPrimary", isArgb = false), useShadow = false ) ), var enableCameraTitle: StyledText = StyledText( text = "Camera permission denied!", color = ScanbotColor("?sbColorOnSurface", isArgb = false) ), var enableCameraExplanation: StyledText = StyledText( text = "Please allow the usage of the camera to start the scanning process.", color = ScanbotColor("?sbColorOnSurfaceVariant", isArgb = false) ))

Configuration of the camera permission request view.

Link copied to clipboard

Configuration of the camera preview mode.

Link copied to clipboard
data class EncryptionParameters(var password: String? = null, var mode: FileEncryptionMode? = null)
Link copied to clipboard
data class FinderCorneredStyle(var strokeColor: ScanbotColor = ScanbotColor("#FFFFFFFF", isArgb = false), var strokeWidth: Double = 3.0, var cornerRadius: Double = 10.0) : FinderStyle

Variant of the viewfinder displaying only the four corners of the scanning area as user guidance.

Link copied to clipboard
data class FinderStrokedStyle(var strokeColor: ScanbotColor = ScanbotColor("#FFFFFFFF", isArgb = false), var strokeWidth: Double = 3.0, var cornerRadius: Double = 10.0) : FinderStyle

Variant of the viewfinder displaying a full outline of the scanning area as user guidance.

Link copied to clipboard
sealed class FinderStyle

Visual appearance of the viewfinder.

Link copied to clipboard
data class ForegroundStyle(var iconVisible: Boolean = true, var color: ScanbotColor = ScanbotColor("#FFFFFF", isArgb = false), var useShadow: Boolean = false)

Configuration of the appearance of foreground elements (e.g. text and/or icons on buttons, etc).

Link copied to clipboard
data class IconButton(var visible: Boolean = true, var color: ScanbotColor = ScanbotColor("#FFFFFF", isArgb = false), var accessibilityDescription: String = "")

Configuration of the icon appearance.

Link copied to clipboard
data class IconStyle(var visible: Boolean = true, var color: ScanbotColor = ScanbotColor("#FFFFFF", isArgb = false))

Configuration of the icon appearance.

Link copied to clipboard
data class IconUserGuidanceConfiguration(var visible: Boolean = true, var icon: IconStyle = IconStyle( color = ScanbotColor("?sbColorOnPrimary", isArgb = false) ), var title: StyledText = StyledText( color = ScanbotColor("?sbColorOnPrimary", isArgb = false) ), var background: BackgroundStyle = BackgroundStyle( fillColor = ScanbotColor("?sbColorSurfaceLow", isArgb = false) ))

Configuration of the hint guiding users through the scanning process.

Link copied to clipboard
Link copied to clipboard

Visual mode used for the navigation bar icons. Android only.

Link copied to clipboard

Configure the orientation of the interface.

Link copied to clipboard
data class Palette(var sbColorPrimary: ScanbotColor = ScanbotColor("#C8193C", isArgb = false), var sbColorPrimaryDisabled: ScanbotColor = ScanbotColor("#F5F5F5", isArgb = false), var sbColorNegative: ScanbotColor = ScanbotColor("#FF3737", isArgb = false), var sbColorPositive: ScanbotColor = ScanbotColor("#4EFFB4", isArgb = false), var sbColorWarning: ScanbotColor = ScanbotColor("#FFCE5C", isArgb = false), var sbColorSecondary: ScanbotColor = ScanbotColor("#FFEDEE", isArgb = false), var sbColorSecondaryDisabled: ScanbotColor = ScanbotColor("#F5F5F5", isArgb = false), var sbColorOnPrimary: ScanbotColor = ScanbotColor("#FFFFFF", isArgb = false), var sbColorOnSecondary: ScanbotColor = ScanbotColor("#C8193C", isArgb = false), var sbColorSurface: ScanbotColor = ScanbotColor("#FFFFFF", isArgb = false), var sbColorOutline: ScanbotColor = ScanbotColor("#EFEFEF", isArgb = false), var sbColorOnSurfaceVariant: ScanbotColor = ScanbotColor("#707070", isArgb = false), var sbColorOnSurface: ScanbotColor = ScanbotColor("#000000", isArgb = false), var sbColorSurfaceLow: ScanbotColor = ScanbotColor("#00000026", isArgb = false), var sbColorSurfaceHigh: ScanbotColor = ScanbotColor("#0000007A", isArgb = false), var sbColorModalOverlay: ScanbotColor = ScanbotColor("#000000A3", isArgb = false))

Value palette describing the colors of the scanner screens.

Link copied to clipboard
data class PolygonStyle(var strokeColor: ScanbotColor = ScanbotColor("#FFFFFFFF", isArgb = false), var fillColor: ScanbotColor = ScanbotColor("#FFFFFF30", isArgb = false), var strokeWidth: Double = 2.0, var cornerRadius: Double = 0.0)

Configuration of the polygon appearance.

Link copied to clipboard
data class PopupMenuItem(var title: StyledText = StyledText( ), var accessibilityDescription: String = "", var icon: IconStyle = IconStyle( ))

Button configuration.

Link copied to clipboard
data class ProgressOverlay(var title: StyledText = StyledText( text = "Please wait...", color = ScanbotColor("?sbColorOnSurface", isArgb = false) ), var progressIcon: IconStyle = IconStyle( color = ScanbotColor("?sbColorOnSurface", isArgb = false) ), var background: BackgroundStyle = BackgroundStyle( strokeColor = ScanbotColor("?sbColorSurface", isArgb = false), fillColor = ScanbotColor("?sbColorSurface", isArgb = false), strokeWidth = 0.0 ), var modalOverlayColor: ScanbotColor = ScanbotColor("?sbColorModalOverlay", isArgb = false))

Configuration of the top screen bar's appearance.

Link copied to clipboard
data class RoundButton(var visible: Boolean = true, var accessibilityDescription: String = "", var backgroundColor: ScanbotColor = ScanbotColor("#0000007A", isArgb = false), var foregroundColor: ScanbotColor = ScanbotColor("#FFFFFF", isArgb = false), var activeBackgroundColor: ScanbotColor = ScanbotColor("#FFCE5C", isArgb = false), var activeForegroundColor: ScanbotColor = ScanbotColor("#1C1B1F", isArgb = false))

Configuration of the round button.

Link copied to clipboard
data class ScanbotAlertDialog(var title: StyledText = StyledText( text = "Title", color = ScanbotColor("?sbColorOnSurface", isArgb = false) ), var subtitle: StyledText = StyledText( text = "Standard explanation message text.", color = ScanbotColor("?sbColorOnSurfaceVariant", isArgb = false) ), var sheetColor: ScanbotColor = ScanbotColor("?sbColorSurface", isArgb = false), var modalOverlayColor: ScanbotColor = ScanbotColor("?sbColorModalOverlay", isArgb = false), var dividerColor: ScanbotColor = ScanbotColor("?sbColorOutline", isArgb = false), var okButton: ButtonConfiguration = ButtonConfiguration( background = BackgroundStyle( fillColor = ScanbotColor("?sbColorPrimary", isArgb = false) ) ), var actionButton: ButtonConfiguration = ButtonConfiguration( visible = false, background = BackgroundStyle( strokeColor = ScanbotColor("#00000000", isArgb = false), fillColor = ScanbotColor("#00000000", isArgb = false), strokeWidth = 0.0 ) ), var cancelButton: ButtonConfiguration = ButtonConfiguration( visible = true, background = BackgroundStyle( strokeColor = ScanbotColor("#00000000", isArgb = false), fillColor = ScanbotColor("#00000000", isArgb = false), strokeWidth = 0.0 ) ))

Configuration of the the standard alert dialog.

Link copied to clipboard
actual class ScanbotColor(colorString: String, isArgb: Boolean)
expect class ScanbotColor(colorString: String, isArgb: Boolean = true)
actual class ScanbotColor(colorString: String, isArgb: Boolean)
Link copied to clipboard
data class ScanbotSdkConfig(var licenseKey: String? = null, var imageQuality: Int? = 80, var imageFormat: ImageFormat? = ImageFormat.PNG, var loggingEnabled: Boolean? = false, var storageBaseDirectory: String? = "", var documentDetectorMode: DocumentDetectorMode? = DocumentDetectorMode.ML_BASED, var encryptionParameters: EncryptionParameters? = null, var useCameraX: Boolean? = false, var allowXnnpackAcceleration: Boolean? = true, var allowGpuAcceleration: Boolean? = true)
Link copied to clipboard
data class Sound(var successBeepEnabled: Boolean = true, var soundType: SoundType = SoundType.MODERN_BEEP)

Sound configuration.

Link copied to clipboard

The sound selection type.

Link copied to clipboard

Visual mode used for the status bar icons.

Link copied to clipboard
data class StyledText(var visible: Boolean = true, var text: String = "", var color: ScanbotColor = ScanbotColor("#FFFFFF", isArgb = false), var useShadow: Boolean = false)

Configuration of the text field appearance.

Link copied to clipboard
data class Timeouts(var autoCancelTimeout: Int = 0, var initialScanDelay: Int = 0)

Configuration of timeouts.

Link copied to clipboard
data class TopBarConfiguration(var title: StyledText = StyledText( visible = false, text = "Scan Item", color = ScanbotColor("?sbColorOnPrimary", isArgb = false) ), var mode: TopBarMode = TopBarMode.SOLID, var statusBarMode: StatusBarMode = StatusBarMode.LIGHT, var backgroundColor: ScanbotColor = ScanbotColor("?sbColorPrimary", isArgb = false), var cancelButton: ButtonConfiguration = ButtonConfiguration( text = "Cancel", background = BackgroundStyle( strokeColor = ScanbotColor("#00000000", isArgb = false), fillColor = ScanbotColor("#00000000", isArgb = false), strokeWidth = 0.0 ), foreground = ForegroundStyle( color = ScanbotColor("?sbColorOnPrimary", isArgb = false) ) ))

Configuration of the top screen bar's appearance.

Link copied to clipboard

Visual mode used for the top bar.

Link copied to clipboard
data class UserGuidanceConfiguration(var visible: Boolean = true, var title: StyledText = StyledText( color = ScanbotColor("?sbColorOnPrimary", isArgb = false) ), var background: BackgroundStyle = BackgroundStyle( strokeColor = ScanbotColor("#00000000", isArgb = false), fillColor = ScanbotColor("?sbColorSurfaceLow", isArgb = false) ))

Configuration of the hint guiding users through the scanning process.

Link copied to clipboard
data class Vibration(var enabled: Boolean = false)

Vibration configuration.

Link copied to clipboard
data class ViewFinderConfiguration(var visible: Boolean = true, var style: FinderStyle = FinderCorneredStyle( strokeColor = ScanbotColor("?sbColorSurface", isArgb = false), strokeWidth = 2.0, cornerRadius = 10.0 ), var overlayColor: ScanbotColor = ScanbotColor("?sbColorSurfaceLow", isArgb = false), var aspectRatio: AspectRatio = AspectRatio( width = 1.0, height = 1.0 ))

Configuration of the scanning interface's viewfinder, serving as guidance to the user.