Migration Guide: DocV Android 2.x to KYC Documents Android

This guide covers everything you need to update when migrating from the legacy DocV Android 2.x SDK to the current Trulioo KYC Documents Android SDK.

Use this guide if your integration uses any of the following:

  • com.trulioo:docv as your Maven dependency
  • TruliooWorkflow to configure the launch
  • Trulioo().registerForActivityResult(...) as the registration helper
  • TruliooResult to handle the result

What's Changed : At a Glance

Area2.xCurrent
Maven artifactcom.trulioo:docv:2.+com.trulioo:kyc-documents:<version>
Artifact sourcegoogle() / mavenLocal()Maven Central
Android Gradle PluginOlder versions9.0.1+
compileSdkOlder levels36
minSdk2424 (unchanged)
Launch inputTruliooWorkflow objectShortcode string
Registration helperTrulioo().registerForActivityResult(...)registerForActivityResult(Trulioo.LaunchKYCDocuments())
Result typeTruliooResultKYCDocumentsResult
Locale, theme, capture settingsSet in the Android host appSet in backend transaction configuration

Before You Start: Check Your Build Prerequisites

The current SDK has higher build-tooling requirements than most 2.x integrations. Verify these before touching any host code — discovering a tooling mismatch after updating dependencies adds unnecessary debugging time.

RequirementCurrent value
Android Gradle Plugin9.0.1
compileSdk36
minSdk24

If your project is on an older AGP or compileSdk, plan those upgrades first and confirm your build is stable before switching the SDK dependency.

Step 1 : Update the Maven Dependency


Replace the legacy docv artifact with kyc-documents:

// Before
implementation("com.trulioo:docv:2.+")

// After
implementation("com.trulioo:kyc-documents:<version>")

The current SDK resolves from Maven Central, not google(). Your settings.gradle.kts should include:

dependencyResolutionManagement {
    repositories {
        mavenCentral()
        google() // Still required for other Android dependencies
    }
}

If com.trulioo:kyc-documents:<version> does not resolve, confirm you are using a published release version and not an internal or staged build.

Step 2: Remove TruliooWorkflow

TruliooWorkflow and WorkflowTheme have been removed from the public Android contract. Delete any usage of these in your host app:

// Remove this entirely
val workflow = TruliooWorkflow(
    shortCode = shortCode,
    locale = "fr-CA",
    isDemo = false,
    enableRegionSelection = true,
    enableDocumentAutoCapture = true,
)

Settings that were previously passed through TruliooWorkflow — locale, theme, region selection, capture behavior — are now resolved from the transaction configuration on your backend. Move these settings to the backend flow that generates the shortcode.

Step 3: Update Launch Contract

The registration and launch pattern changed significantly. Replace the legacy coroutine-based helper with the standard AndroidX activity-result contract:

// Before
lifecycleScope.launch {
    val activityLauncher = Trulioo().registerForActivityResult(this@Activity, workflow) { result ->
        when (result) {
            is TruliooResult.Complete -> println(result.transactionId)
            is TruliooResult.Error -> println(result.message)
            is TruliooResult.Exception -> println(result)
        }
    }

    if (activityLauncher is Success) {
        activityLauncher.value.launch(workflow)
    }
}

// After
private val docsLauncher =
    registerForActivityResult(Trulioo.LaunchKYCDocuments()) { result ->
        when (result) {
            is KYCDocumentsResult.Complete -> println(result.transactionId)
            is KYCDocumentsResult.Error -> println(result.message)
            is KYCDocumentsResult.Exception -> println(result.exception.message)
        }
    }

fun startVerification(shortcode: String) {
    docsLauncher.launch(shortcode)
}

Key differences:

  • Register Trulioo.LaunchKYCDocuments() directly — no coroutine scope or wrapper needed.
  • Launch with a shortcode string, not a TruliooWorkflow object.
  • The SDK activity owns intent creation and result parsing. Do not construct intents manually.

Step 4: Update Result Handling

Rename TruliooResult to KYCDocumentsResult throughout your codebase:

// Before
is TruliooResult.Complete  →  // After: is KYCDocumentsResult.Complete
is TruliooResult.Error     →  // After: is KYCDocumentsResult.Error
is TruliooResult.Exception →  // After: is KYCDocumentsResult.Exception

The result behavior is the same, with one addition: KYCDocumentsResult.Error now exposes optional operation metadata alongside message, code, and transactionId.

Step 5: Review Host-Side Options (Optional)

The current SDK exposes a much narrower set of host-side options than 2.x. The only public launch option is TruliooLaunchOptions, which lets you skip the intro consent screen:

private val docsLauncher =
    registerForActivityResult(
        Trulioo.LaunchKYCDocuments(
            TruliooLaunchOptions(skipIntroConsent = true)
        )
    ) { result ->
        // Handle KYCDocumentsResult
    }

This is not a replacement for TruliooWorkflow. All other configuration — locale, branding, capture settings — belongs in the backend transaction.

Migration Checklist

  • Upgrade Android Gradle Plugin to 9.0.1 and compileSdk to 36 before changing the SDK dependency.
  • Replace com.trulioo:docv:2.+ with com.trulioo:kyc-documents:version
  • Add mavenCentral() to your repository list as the resolution source for the Trulioo artifact.
  • Delete all TruliooWorkflow and WorkflowTheme usage from the host app.
  • Move locale, theme, region-selection, and capture settings to the backend transaction configuration.
  • Replace Trulioo().registerForActivityResult(...) with registerForActivityResult(Trulioo.LaunchKYCDocuments()).
  • Update launch calls to pass a shortcode string instead of a workflow object.
  • Rename TruliooResult to KYCDocumentsResult in all result-handling code.
  • Review whether TruliooLaunchOptions(skipIntroConsent = true) is needed for your flow.