Skip to main content

Getting started with the Kotlin Multiplatform Barcode Scanner SDK's RTU UI

Adding the RTU UI dependency

The RTU UI components are included in the main SDK bundle package kmp-barcode-sdk. Add it as a dependency to your project:

implementation("io.scanbot:kmp-barcode-sdk:$scanbotSDK")

Get the latest $scanbotSDK from the changelog.

Launching the RTU UI Barcode Scanner

With just a few lines of code, you can integrate barcode scanning into your application's workflow.

Barcode Scanner
loading...

Handling scan results

Result is represented by the sealed interface io.scanbot.sdk.kmp.common.Result, which has two main implementations: Result.Success and Result.Failure (the latter includes several more specific subclasses).

The scan result is returned only when the result is Result.Success. You can access it using convenience methods such as result.onSuccess { data -> /* handle data here */ }, or by retrieving the value from the result.data field.

The result object provides scanned items containing rich barcode data and extracted documents. Use its properties to retrieve text, format, and structured data.

You can find all available properties of the result in the API documentation.

Handling the result
loading...

Want to scan longer than one minute?

Generate a free trial license to test the Scanbot SDK thoroughly.

Get free trial license