Installation
This guide covers how to install and set up the DocIDV Android SDK in your project.
Integrate DocIDV SDK
Follow these steps to integrate the DocIDV library into your application.
Repository Setup
In your project's settings.gradle (KTS), besides any other repositories you already have, include this maven repository:
repositories {
google()
mavenCentral()
// Add this repo containing the DOCIDV library.
maven {
url = uri("https://raw.githubusercontent.com/idnow/idnow-android-sdk/main")
}
}
Dependencies Configuration
The DOCIDV SDK provides a BOM to simplify dependency management. By importing the BOM, you no longer need to specify individual module versions — they are all aligned automatically.
In libs.versions.toml:
[versions]
docidv = "1.6.0"
[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" }
In your app's build.gradle:
dependencies {
// 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)
}
Alternatively, without version catalog:
dependencies {
// Import the BOM
implementation platform('io.idnow.docidv:bom:1.6.0')
// No need to specify versions
implementation 'io.idnow.docidv:core'
implementation 'io.idnow.docidv:ai'
// Optional - German eID (raises minSdk to 28)
implementation 'io.idnow.docidv:eid-governikus'
}
The old single dependency io.idnow.docidv.android.sdk:docidv is still available but will be removed in a future release. We recommend migrating to the modular setup as soon as possible.
// ⚠️ Deprecated — will be removed in a future release
implementation "io.idnow.docidv.android.sdk:docidv:1.6.0"
Integrate the NFC Dependency
The SDK also supports NFC scanning to read data from the chip on e-documents. The sdk is available in 2 variant, with NFC feature and without NFC, providing the best flexibility for different use cases of our customers. We recommend using the NFC feature for the best security, fraud prevention and user experience.
- To use the NFC feature, please reach out to your IDnow contact or IDnow Support (support@idnow.io) and obtain the required NFC dependencies.
After contacting Customer Support with a request for the NFC package, you will receive an archive to integrate into your application. This archive is compatible with the corresponding SDK version and onwards, until a new or updated version of the NFC library is released. (For example, if the name of the archive contains the keywords for AI SDK v5.13.0, it means that this NFC library is compatible with AI SDK v5.13.0+ onwards, until an updated version of the NFC library is released).
The contents of the received archive will contain:
-
Detailed instructions file on how to set up the NFC dependency + fixes on potential build issues which you might encounter based on your local setup
-
AAR files for NFC dependency to include in your app
Overview of the NFC integration:
-
Copy all the
.aarfiles from the given archive'slibsfolder into your own app'slibsfolder. -
Make sure to compile the
libsfolder. In yourapp/build.gradlefile, add the below:
implementation fileTree(include: ['*.aar'], dir: 'libs')
// or if you have also jar files, use this line
// implementation fileTree(include: ['*.jar', '*.aar'], dir: 'libs')
- In your project level
build.gradlefile, make sure to have this:
repositories {
//...
flatDir {
dirs 'libs'
}
//...
}
- The above AAR files require some transitive dependencies, which you need to add manually in your
app/build.gradlefile:
// ReadID Dependencies
// iddoc connector
implementation 'com.google.code.gson:gson:2.11.0'
implementation 'androidx.annotation:annotation:1.5.0'
implementation 'org.bouncycastle:bcpkix-jdk18on:1.78.1'
// readid mrz
implementation 'androidx.lifecycle:lifecycle-runtime-ktx:2.8.6'
implementation('com.google.android.gms:play-services-tflite-java:16.1.0') {
exclude group: "org.tensorflow"
}
// readid core
implementation 'org.jetbrains.kotlin:kotlin-stdlib:1.9.24'
implementation 'net.sf.scuba:scuba-sc-android:0.0.26'
implementation 'net.sf.scuba:scuba-smartcards:0.0.20'
implementation 'edu.ucar:jj2000:5.2'
implementation("org.ejbca.cvc:cert-cvc:1.4.13") {
exclude group: 'org.bouncycastle', module: 'bcprov-jdk15on'
}
implementation 'org.jmrtd:jmrtd:0.7.42'
// readid ui core
implementation 'androidx.fragment:fragment:1.8.1'
implementation 'androidx.preference:preference-ktx:1.2.1'
implementation 'com.google.android.material:material:1.12.0'
implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
implementation 'androidx.databinding:viewbinding:8.5.2'
// viz capture
implementation "com.google.mlkit:barcode-scanning:17.3.0"
implementation "com.google.mlkit:face-detection:16.1.7"
- Add the following ProGuard rules in your application's
proguard-rules.profile:
# ReadID
-keep,includedescriptorclasses class com.readid.** { *; }
-keep enum nl.innovalor.logging.data.** { *; }
-keep enum nl.innovalor.logging.data.**$** { *; }
-keepclassmembers class nl.innovalor.logging.data.** { <fields>; }
-keep,includedescriptorclasses class net.sf.scuba.smartcards.IsoDepCardService { public <init>(***); }
-keep,includedescriptorclasses class nl.innovalor.cert.** { public <init>(***); }
-keep,includedescriptorclasses class org.bouncycastle.** { *; }
-keepclassmembers class * extends net.sf.scuba.data.Country { *; }
-keep,includedescriptorclasses class nl.innovalor.mrtd.model.** { private <fields>; <methods>; }
-dontwarn com.google.gson.**
-dontwarn javax.naming.**
-dontwarn javax.naming.directory.*
-dontwarn jj2000.disp.*
-dontwarn jj2000.j2k.decoder.*
-dontwarn org.jmrtd.imageio.*
-dontwarn org.jmrtd.jj2000.**
-dontwarn org.jnbis.imageio.*
📥 DocIDV is now imported into your project.
Support
If you encounter installation issues:
- Search GitHub Issues
- Contact IDnow Support