---
Source: https://docs.microblink.com/platform/sdk/android/flow
Title: Flow
Description: Understanding the verification flow and lifecycle in Android SDK
---

# Flow

### Starting the SDK

To start the SDK, call `MicroblinkPlatform.startVerification` method with the prepared configuration:

```kotlin
MicroblinkPlatform.startVerification(this, createMbpConfig())
```

Configuration example:

```kotlin
private fun createMbpConfig() = MicroblinkPlatformConfig(
        mbpResultListener = mbpResultListener,
        mbpServiceSettings = MicroblinkPlatformServiceSettings(
            // IMPORTANT: Replace the following values with your own
            workflowId = "your_workflow_id",
            hostUrl = "your_host_url",
            // add your additional request headers if needed, e.g. for authorization
            additionalRequestHeaders = mapOf("Authorization" to "Basic your_base64_credentials"),
        ),
        mbpUiSettings = MicroblinkPlatformUiSettings(
            // customize the UI if needed
        ),
        consent = MicroblinkPlatformConsent(
		// replace with real user ID
		userId = "user_id",
                // Represents collected end-user's consent for their data
		// to be processed and stored by Microblink.
		// The end-user's consent is required for us to be able to complete the KYC verification.
                isProcessingStoringAllowed = true,
                // Additionally, represents collected end-user's consent for their
   		// data to be used by Microblink for the improvement of the
   		// fraud detection capabilities in our own products (ie. for training our models).                        
		isTrainingAllowed = true,
	)
    )
```

### Retrieving information
Verification results are returned via `MicroblinkPlatformResultListener`

```kotlin
private val mbpResultListener = object : MicroblinkPlatformResultListener {
        override fun onVerificationFinished(result: MicroblinkPlatformResult) {
            when (result.state) {
                MicroblinkPlatformResult.FinishedState.Success -> // Handle successful verification
                MicroblinkPlatformResult.FinishedState.Failure -> // Handle failed verification
                MicroblinkPlatformResult.FinishedState.Review -> // Handle verification that requires manual review
            }
            // use the transaction ID if needed
           	val transactionId = result.transactionId
        }

        override fun onVerificationCanceled() {
            // Handle verification cancellation
        }

    }
```


Last updated on Apr 23, 2026
