Skip to content

Android

This guide provides step-by-step instructions on installing the IDV SDK into an Android application.

Prerequisites

Before integrating the SDK, ensure the following:

  • Android Target SDK 34 recommended
  • Camera permission enabled
  • NFC permission enabled
  • Internet permission enabled

The Regula IDV SDK dependency should be added to build.gradle.kts.

The SDK includes multiple modules (Document Reader SDK, Face SDK). Include only the modules required for your workflow and follow their specific setup instructions.

Add Regula SDK to Gradle

1. Add Regula's Maven repository URL to your build.gradle.kts file:

   maven {
   url = uri("https://maven.regulaforensics.com/RegulaDocumentReader")
   }

   // only for Beta versions
   maven {
   url = uri("https://maven.regulaforensics.com/RegulaDocumentReader/Beta")
   }

2. Copy the regula.license and db.dat files to the app/src/main/assets/Regula folder.

3. Enable view and data binding features in your app-level build.gradle.kts by adding them to the android section:

    buildFeatures {
        viewBinding=true
        dataBinding=true
    }

and add the kotlin-kapt plugin:

    plugins {
        id("kotlin-kapt")
    }

4. In your app-level build.gradle.kts, add the following dependencies:

// Required only if you're going to use the Document Reader SDK in your workflows
implementation("com.regula.documentreader.core:fullrfid:8.2+@aar") {}
implementation("com.regula.idv:docreader:3.1.+@aar") {
        isTransitive = true
    }

// Required only if you're going to use the Face SDK in your workflows
implementation("com.regula.face.core:basic:7.1+@aar") {}
implementation("com.regula.idv:face:3.1.+@aar") {
        isTransitive = true
    }

// Main dependency
implementation("com.regula.idv:api:3.1.+@aar") {
        isTransitive = true
    }

Sync Gradle after adding the dependencies.

Update AndroidManifest.xml

Ensure the following permissions and features are included:

<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools">

    <uses-feature android:name="android.hardware.camera"
            android:required="true" />

    <uses-permission android:name="android.permission.INTERNET" />

    <!-- Required only if you're going to scan documents using a camera -->
    <uses-permission android:name="android.permission.CAMERA"/>

    <!-- Required only if you're going to read an RFID chip -->
    <uses-permission android:name="android.permission.NFC" />

</manifest>