VI Android SDK Upgrade
This guide walks you through upgrading your Android app from the VideoIdent (VI) SDK to the DocIDV SDK. The DocIDV SDK introduces a simplified API with notable changes to how the SDK is initialized, started, and how results are delivered to your app.
The DocIDV SDK requires a minimum Android API level of 24.
What has changed
Initialization
The VI SDK required you to pass a companyId (your customer shortname) during initialization. In DocIDV, this is no longer needed — you pass a configuration object instead, and the SDK resolves your account from the identification token.
Before (VI SDK)
IDnowSDK.getInstance().initialize(activity, "your-company-id");
// or with language
IDnowSDK.getInstance().initialize(activity, "your-company-id", "en");
After (DocIDV SDK)
val config = IDnowDocIDVConfig.Builder.getInstance().build()
IDnowDocIDV.getInstance().initialize(this, config)
You can optionally set a language ISO code in the config to override the device language.
Starting an identification
The VI SDK accepted a transactionToken to start an identification. DocIDV uses an identId (the identification ID returned by the IDnow API when you create an identification transaction).
Before (VI SDK)
IDnowSDK.getInstance().start(transactionToken);
After (DocIDV SDK)
IDnowDocIDV.getInstance().start(identToken) { result ->
// handle result
}
The result callback is now mandatory in DocIDV (see Handling results below).
Handling results
The VI SDK delivered results via onActivityResult() in your Activity. The DocIDV SDK removes this mechanism entirely — results are delivered exclusively through the callback passed to the start() method.
Before (VI SDK)
@Override
protected void onActivityResult(int requestCode, int resultCode, Intent data) {
if (requestCode == IDnowSDK.REQUEST_ID_NOW_SDK) {
if (resultCode == IDnowSDK.RESULT_CODE_SUCCESS) {
// success
} else if (resultCode == IDnowSDK.RESULT_CODE_CANCEL) {
String abortReason = data.getStringExtra(IDnowSDK.RESULT_DATA_ERROR);
} else if (resultCode == IDnowSDK.RESULT_CODE_FAILED) {
String error = data.getStringExtra(IDnowSDK.RESULT_DATA_ERROR);
}
}
}
After (DocIDV SDK)
IDnowDocIDV.getInstance().start(identToken) { result ->
when (result.resultType) {
ResultType.FINISHED -> {
// Identification completed successfully
}
ResultType.CANCELLED -> {
// User cancelled — result.statusCode contains the abort reason
}
ResultType.ERROR -> {
// An error occurred — result.statusCode contains the error code (e.g. E100)
}
}
}
UI customisation
In the VI SDK, UI customisation required build-time changes in your app (resource overrides, theme configuration in code).
In the DocIDV SDK, no build-time customisation is required. Your branding and theme configuration is managed centrally through IDnow and applied automatically by the SDK at runtime. Contact your IDnow Customer Success representative to set up or update your theme configuration.
Settings no longer available
The following VI SDK settings are not available in the DocIDV SDK:
| VI SDK setting | What to do |
|---|---|
setTransactionToken() | Pass the ident ID directly to the start() method instead. |
setEnvironment() | The environment is resolved automatically from the identification token. |
setShowErrorSuccessScreen() | Success screens are no longer part of the SDK. Implement them in your own app. Failure screens are always shown by the SDK. |
setShowVideoOverviewCheck() | Terms & Conditions screens can be configured through your IDnow customer configuration. |
setApiHost() / setWebsocketHost() | Custom server endpoints are not supported in the DocIDV SDK. |
setConnectionType() | The DocIDV SDK always uses a WebSocket connection. |
setCertificateProvider() / setDtlsCertificateProvider() | Custom certificate providers are not yet supported in the DocIDV SDK. |
enableLogging() / disableLogging() | Logging control is not yet available. HTTP logging can be enabled via IDnowDocIDVConfig. |
Upgrade steps
1. Remove the VI SDK and add DocIDV SDK
Remove the VideoIdent SDK dependency from your build.gradle and delete any related initialization and result-handling code.
Add the IDnow Maven repository to your project. Depending on your setup, do this in one of the following files:
- project build.gradle
- project settings.gradle
allprojects {
repositories {
// ...
maven {
url "https://raw.githubusercontent.com/idnow/idnow-android-sdk/main"
}
// ...
}
}
pluginManagement {
// ...
repositories {
// ...
maven {
url "https://raw.githubusercontent.com/idnow/idnow-android-sdk/main"
}
// ...
}
}
2. Replace the SDK dependency
Remove the AI SDK dependency and add the DocIDV SDK in your app/build.gradle:
- build.gradle
- libs.versions.toml
// Import the BOM
implementation(platform(libs.idnow.docidv.bom))
// No need to specify versions — managed by the BOM
implementation(libs.idnow.docidv.core)
implementation(libs.idnow.docidv.ai)
// Optional - German eID (raises minSdk to 28)
implementation(libs.idnow.docidv.eid.governikus)
[versions]
docidv = "LATEST_VERSION"
[libraries]
idnow-docidv-bom = { group = "io.idnow.docidv", name = "bom", version.ref = "docidv" }
idnow-docidv-core = { group = "io.idnow.docidv", name = "core" }
idnow-docidv-ai = { group = "io.idnow.docidv", name = "ai" }
idnow-docidv-eid-governikus = { group = "io.idnow.docidv", name = "eid-governikus" }
Then in app/build.gradle:
// Import the DocIDV BOM
implementation(platform(libs.idnow.docidv.bom))
// Import DocIDV Core + AI
implementation(libs.idnow.docidv.core)
implementation(libs.idnow.docidv.ai)
// Optional - German eID
implementation(libs.idnow.docidv.eid.governikus)
3. Sync the project
Sync your Gradle project to resolve and download the new dependency.
4. Initialize and start the SDK
Add the following to your Activity, replacing your previous VI SDK calls:
/**
* Call once when your Activity is ready, before starting any identification.
*/
private fun initSDK() {
val config = IDnowDocIDVConfig.Builder.getInstance().build()
IDnowDocIDV.getInstance().initialize(this, config)
}
/**
* Call this after your backend creates an identification and returns the identToken.
*/
private fun startIdentification(identToken: String) {
IDnowDocIDV.getInstance().start(identToken) { result ->
when (result.resultType) {
ResultType.FINISHED -> {
// Identification completed successfully
handleIdentificationSuccess()
}
ResultType.CANCELLED -> {
// User cancelled — result.statusCode contains the abort reason
handleIdentificationCancelled(cancelReason = result.statusCode)
}
ResultType.ERROR -> {
// An error occurred — result.statusCode contains the error code, result.message the details
handleIdentificationError(errorCode = result.statusCode, errorMessage = result.message)
}
}
}
}
5. Remove onActivityResult handling
You can safely remove any onActivityResult logic that previously handled VI SDK results — the DocIDV SDK does not use this mechanism.
For full SDK configuration options and API reference, see the Android SDK documentation.