---
Source: https://docs.microblink.com/platform/sdk/android/configuration
Title: Configuration
Description: Configuration options and settings for Microblink Platform Android SDK
---

# Configuration

The Android SDK is configured through `MicroblinkPlatformConfig`, which you pass to `MicroblinkPlatform.startVerification`:

```kotlin
MicroblinkPlatform.startVerification(
    activity = this,
    config = MicroblinkPlatformConfig(
        mbpResultListener = ...,
        mbpServiceSettings = MicroblinkPlatformServiceSettings(
            workflowId = "...",
            proxySettings = MicroblinkPlatformProxySettings(
                url = "..."
            ),
            consent = MicroblinkPlatformConsent(
                userId = "...",
                isProcessingStoringAllowed = true,
                givenOn = "..."
            )
        )
    )
)
```

See the [quickstart](./quickstart.md) for a full integration example.

## Configuration object

```kotlin
MicroblinkPlatformConfig(
    mbpResultListener = ...,
    mbpServiceSettings = ...,
    mbpUiSettings = ...,             // optional
    mbpCardScanResultListener = ..., // optional
)
```

## Required fields

You must set the following fields.
Other fields are optional and are described in the [Optional fields](#optional-fields) section.

### `mbpResultListener`

```kotlin
MicroblinkPlatformConfig(
    mbpResultListener = object : MicroblinkPlatformResultListener {
        override fun onVerificationFinished(mbpResult: MicroblinkPlatformResult) { ... }
        override fun onVerificationCanceled(cancelState: MicroblinkPlatformCancelState) { ... }
    },
    ...
)
```

The listener that receives verification results and cancellation events.
See [Listener methods](#listener-methods) below for details on each callback.

---

### `mbpServiceSettings`

```kotlin
MicroblinkPlatformConfig(
    ...
    mbpServiceSettings = MicroblinkPlatformServiceSettings(
        workflowId = "example123",
        proxySettings = MicroblinkPlatformProxySettings(
            url = "https://your.proxy.server"
        ),
        consent = MicroblinkPlatformConsent(...)
    )
)
```

This field holds configuration options for how the SDK communicates with the [proxy](../../proxy.md) and the [Platform API](/platform/api).

---

#### `workflowId`

```kotlin
MicroblinkPlatformServiceSettings(
    workflowId = "example123",
    ...
)
```

This is the ID of your workflow.
You can get the `workflowId` from the [Platform dashboard](../../build-workflow.md).

---

#### `proxySettings.url`

```kotlin
MicroblinkPlatformProxySettings(
    url = "https://your.proxy.server",
    ...
)
```

The `url` is the base URL of the proxy service you are hosting.
By default, the SDK appends `/transaction` to this value when creating new transactions.
If you're using [our proxy](https://github.com/MicroblinkPlatform/microblink-platform-transaction-proxy) (latest version), you don't need to change anything.

For additional proxy settings (additional headers, specifying different proxy path values etc.), see the [proxy reference](https://microblinkplatform.github.io/microblink-platform-android/microblink-platform/com.microblink.platform/-microblink-platform-proxy-settings/index.html).

---

#### `consent`

Consent is a mandatory field where you provide a **unique user identifier** and the user's consent to process their data.
You provide the consent by setting the `isProcessingStoringAllowed` flag to `true`.
If it is not set, we will show our own consent form to the user.
If they reject, the transaction will be abandoned.

:::danger[Never reuse user IDs]

Never reuse the same user ID for multiple users.
Each consent to process someone's personal data **must** be accompanied by a **unique identifier** that can be used to associate this consent with the person who gave it.

:::

```kotlin
MicroblinkPlatformConsent(
    // Required:
    //highlight-start
    userId = "...",
    isProcessingStoringAllowed = true,
    //highlight-end
    // Optional:
    isTrainingAllowed = true,
    givenOn = "...",
    note = null
)
```

- `isTrainingAllowed`: set to `true` to allow the user's data to be used for training machine learning models; defaults to `false`.
- `givenOn`: a UTC timestamp in milliseconds for when consent was given; optional, but must be provided if `isProcessingStoringAllowed` is true.

---

## Optional fields

### `mbpUiSettings`

```kotlin
MicroblinkPlatformUiSettings(
    colorScheme = lightColorScheme(
        primary = Cobalt,
        background = Color.White,
    ),
    typography = MicroblinkPlatformTypography.default(myFontFamily),
    documentScanningTypography = ParcelableUiTypography.Default(myFontFamily),
    mbpImages = MicroblinkPlatformImages(
        home = R.drawable.my_home,
        verificationSuccess = R.drawable.my_success,
        verificationFail = R.drawable.my_fail,
        verificationReview = R.drawable.my_review,
        cameraPermission = R.drawable.my_camera_permission,
    ),
    buttonShape = ButtonShape(shape = CircleShape),
)
```

Customizations include:

- [`colorScheme`](https://microblinkplatform.github.io/microblink-platform-android/microblink-platform/com.microblink.platform/-microblink-platform-ui-settings/color-scheme.html): an `androidx.compose.material3.ColorScheme` controlling button and background colors throughout the SDK.
- [`typography`](https://microblinkplatform.github.io/microblink-platform-android/microblink-platform/com.microblink.platform/-microblink-platform-ui-settings/typography.html): controls fonts across the SDK UI screens.
- [`documentScanningTypography`](https://microblinkplatform.github.io/microblink-platform-android/microblink-platform/com.microblink.platform/-microblink-platform-ui-settings/document-scanning-typography.html): controls fonts specifically within the document capture screens.
- [`mbpImages`](https://microblinkplatform.github.io/microblink-platform-android/microblink-platform/com.microblink.platform/-microblink-platform-ui-settings/mbp-images.html): used to replace the default images on the home, result, and camera permission screens.
- [`buttonShape`](https://microblinkplatform.github.io/microblink-platform-android/microblink-platform/com.microblink.platform/-microblink-platform-ui-settings/button-shape.html): controls the corner shape of action buttons on the home, error, camera permission, and result screens

Read more about [how to customize your Android SDK integration](./customization.md).

---

### `mbpCardScanResultListener`

```kotlin
MicroblinkPlatformConfig(
    ...
    mbpCardScanResultListener = object : MicroblinkPlatformCardScanResultListener {
        override fun onCardScanned(cardResult: CardScanResult) {
            // cardResult.cardNumber
        }
    }
)
```

An optional listener for receiving card scan results during the flow.
`CardScanResult` contains `cardNumber`.

---

## Listener methods

### Verification finished

```kotlin
override fun onVerificationFinished(mbpResult: MicroblinkPlatformResult) {
    when (mbpResult.state) {
        MicroblinkPlatformResult.FinishedState.Accept -> { ... }
        MicroblinkPlatformResult.FinishedState.Reject -> { ... }
        MicroblinkPlatformResult.FinishedState.Review -> { ... }
    }
    val transactionId = mbpResult.transactionId
}
```

Called when the transaction finishes.
`MicroblinkPlatformResult` contains:

- `state`: `Accept`, `Reject`, or `Review`
- `transactionId`: the unique identifier of the completed transaction

### Verification canceled

```kotlin
override fun onVerificationCanceled(cancelState: MicroblinkPlatformCancelState) {
    when (cancelState.cancelReason) {
        MicroblinkPlatformCancelState.CancelReason.UserCanceled -> { ... }
        MicroblinkPlatformCancelState.CancelReason.ConsentDenied -> { ... }
    }
    val transactionId = cancelState.transactionId
}
```

Called when the user exits the workflow before completion.
`MicroblinkPlatformCancelState` contains:

- `cancelReason`: `UserCanceled` or `ConsentDenied`
- `transactionId`: the transaction ID, if available at the time of cancellation


Last updated on Jun 18, 2026
