Skip to main content
A lightweight, server-driven Android SDK for identity verification with minimal configuration required.

GitHub Repository

View source code and examples on GitHub

Requirements

Feature availability by API level: Document and face auto-detection use MediaPipe (API 24+). On API 23 devices the SDK falls back to manual capture with a timed shutter button. All other features work across the full API 23+ range.

Installation

Step 1: Add the Repository

Add the Didit Maven repository to the repositories block in your settings.gradle.kts:
Or if using settings.gradle (Groovy):

Step 2: Add the Dependency

Add the SDK dependency to your app’s build.gradle.kts: (!) Regarding the version ensure you check the GitHub repository for the latest version.
Or if using build.gradle (Groovy):

SDK variants

The Android SDK ships as four separate artifacts, so your app only pays the binary cost of the features it uses. me.didit:didit-sdk above is the full bundle. Pick exactly one: Since 4.6.0, native WalletConnect wallet-signing ships as its own optional add-on, me.didit:didit-sdk-wallet. The full me.didit:didit-sdk bundle already includes it, so nothing changes if you install the bundle. If you use one of the slimmer artifacts and want wallet-ownership confirmation to run natively inside your app, add me.didit:didit-sdk-wallet next to it; without the add-on the SDK completes wallet ownership through a secure browser flow instead, so the feature keeps working either way. Moving WalletConnect out of didit-sdk-core also removed several megabytes of wallet dependencies from every build that does not need them. All artifacts are published at the same version, so keep them on 4.6.0.

Keeping the download small

The detection models used for auto-capture are downloaded at runtime and cached, so they never count against your app’s size. What auto-capture adds to your app is the ML runtime’s native library, and that cost is per CPU architecture: roughly 10 MB for arm64-v8a, 7 MB for armeabi-v7a, and 13 MB for each of the two x86 emulator architectures. To pay that cost only once:
  1. Publish an Android App Bundle (AAB). Google Play delivers only the device’s own architecture and languages, so an arm64 phone installs roughly 10 MB of native code (about 4 MB of compressed download). A universal APK instead packs all four architectures — over 40 MB — which is the most common cause of unexpectedly large size measurements.
  2. If you distribute a single APK and your audience is ARM phones and tablets, restrict the bundled architectures:
    Keep every ABI your users actually run — add x86_64 if you target Chromebooks or other x86 devices, or publish per-ABI APK splits so no device loses support.
  3. Enable R8isMinifyEnabled = true and isShrinkResources = true in your release build type (minifyEnabled true / shrinkResources true if you use Groovy build.gradle). The SDK ships its own consumer rules, so unused SDK code is stripped with no extra configuration.
  4. Limit bundled languages with resConfigs(...) if you do not need all 48 SDK locales in an APK build; AAB language splits handle this automatically on Google Play.

Step 3: Add Packaging Exclusion

Add this to your app’s android block to avoid build conflicts:
That’s it! Gradle will automatically resolve all transitive dependencies.

Permissions

The SDK requires the following permissions. These are declared in the SDK’s AndroidManifest.xml and will be merged automatically into your app’s manifest:

Camera and NFC Features

The SDK declares android.hardware.camera and android.hardware.nfc as optional features (android:required="false"). This ensures your app can be installed on devices without a camera or NFC hardware — the SDK will gracefully handle missing hardware at runtime.

Quick Start

Step 1: Initialize the SDK

Initialize the SDK in your Application.onCreate():

Step 2: Start Verification and Handle Results


Integration Methods

The SDK supports two integration methods: No backend required. The SDK creates the session directly using your workflow ID from the Didit Console. Limited to vendorData only.
Your backend creates the session via the Create Verification Session API (POST /v3/session/) with full parameter support (contact_details, expected_details, metadata, callback, etc.), then passes the session_token to the SDK.
This approach gives you full control over:
  • Associating sessions with your users (vendor_data)
  • Setting custom metadata
  • Configuring callbacks per session
  • Providing contact details and expected details for cross-validation

Configuration

Customize the SDK behavior:

Configuration Options

Options showCloseButton, showExitConfirmation, and closeOnComplete match the Web SDK’s DiditSdkConfiguration. Mobile-specific options languageLocale and fontFamily exist because the mobile SDK renders the full verification UI natively (unlike the Web SDK which delegates to the hosted frontend inside an iframe).
Theming & Colors: Colors, backgrounds, and intro screen settings are configured through your White Label settings in the Didit Console, not in the SDK configuration. This ensures consistent branding across all platforms.

Language Support

The SDK supports 53 languages. If no language is specified, the SDK uses the device locale with English as fallback.
View All Supported Languages →

Advanced Options

For advanced session parameters (contact_details, expected_details, metadata, callback), use the Backend Session method. Your backend calls the Create Verification Session API with full parameters, then passes the session_token to the SDK.

Handling Results

The VerificationResult sealed class provides the outcome of the verification:

Result Cases

SessionData Properties

Error Types

All errors are sealed subclasses of me.didit.sdk.VerificationError:

Complete Result Handling Example


Observing SDK State

You can observe the SDK state for custom loading UI:

ProGuard / R8

The SDK includes its own consumer ProGuard rules. No additional configuration is needed. If you use R8 full mode, you may need to add this to your gradle.properties:

End-to-End Example (Backend Session → Android SDK → Result)

This pattern is the production-ready integration. Your backend creates the session, your Android app receives the session_token, and the SDK runs the flow.

1. Backend — create the session

2. Android — exchange and start the SDK

3. Backend — receive the final decision via webhook

The SDK result is convenient for UI feedback, but the authoritative outcome arrives via webhook. See the Webhooks guide for HMAC verification.

Complete Example