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:docvas your Maven dependencyTruliooWorkflowto configure the launchTrulioo().registerForActivityResult(...)as the registration helperTruliooResultto handle the result
What's Changed : At a Glance
| Area | 2.x | Current |
|---|---|---|
| Maven artifact | com.trulioo:docv:2.+ | com.trulioo:kyc-documents:<version> |
| Artifact source | google() / mavenLocal() | Maven Central |
| Android Gradle Plugin | Older versions | 9.0.1+ |
compileSdk | Older levels | 36 |
minSdk | 24 | 24 (unchanged) |
| Launch input | TruliooWorkflow object | Shortcode string |
| Registration helper | Trulioo().registerForActivityResult(...) | registerForActivityResult(Trulioo.LaunchKYCDocuments()) |
| Result type | TruliooResult | KYCDocumentsResult |
| Locale, theme, capture settings | Set in the Android host app | Set 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.
| Requirement | Current value |
|---|---|
| Android Gradle Plugin | 9.0.1 |
compileSdk | 36 |
minSdk | 24 |
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
TruliooWorkflowobject. - 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
compileSdkto 36 before changing the SDK dependency. - Replace
com.trulioo:docv:2.+withcom.trulioo:kyc-documents:version - Add
mavenCentral()to your repository list as the resolution source for the Trulioo artifact. - Delete all
TruliooWorkflowandWorkflowThemeusage from the host app. - Move locale, theme, region-selection, and capture settings to the backend transaction configuration.
- Replace
Trulioo().registerForActivityResult(...)withregisterForActivityResult(Trulioo.LaunchKYCDocuments()). - Update launch calls to pass a shortcode string instead of a workflow object.
- Rename
TruliooResulttoKYCDocumentsResultin all result-handling code. - Review whether
TruliooLaunchOptions(skipIntroConsent = true)is needed for your flow.

