Verdi Mobile SDK

This SDK can be used to identify a user via passport or Id Card.

In this repository, you can find the library itself and the Sample app which implements it.


root build.gradle:

allprojects {
    repositories {
		maven { url '' }


dependencies {
	implementation 'com.github.AkhadbekDalimov:mobileverdyverdysdk:1.0.1'

Required Permissions

Internet permission should be provided in the AndroidManifest

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


In order to start using the SDK, Verdi class should be initialized with Context and VerdiUserConfig , this action preferably should be done in the Application class.

Required fields in the VerdiUserConfig

- appId - Id which can be provided by DIGID company

Optional fields in the VerdiUserConfig

- locale - The language of the SDK, by default it is Russian `ru` language

Example :

    val config = VerdiUserConfig
            .locale("uz") // uz, ru, en
            .appId("Your App Id")
        Verdi.init(applicationContext, config)

HttpLoggingInterceptor can be enabled

   Verdi.logs = BuildConfig.DEBUG

Basically the SDK has 2 main features. Identification and Authorization.


  1. The user should provide the Passport or Id Card info:

    Required fields

     - Document Number - (e.g AA1234567)
     - Date of Birth - (e.g 31.12.1990 with this format`dd.MM.yyyy`)
     - Date of Expiry - (e.g 31.12.2024 with this format`dd.MM.yyyy`)
    • DocumentInputValidation class can be used to validate the correctness of the document info, if user types them manually.


        val isEachFieldValid =
            DocumentInputValidation.isInputValid(DocumentInputType.PASSPORT(passportSeries)) &&
                DocumentInputValidation.isInputValid(DocumentInputType.BIRTHDAY(dateOfBirth)) &&
    • SDK Provides Passport and ID card scan tool, which will read the required info in the valid format. If the scan reads the document successfully, Verdi.user object holds the required scanned info. Verdi.openDocumentScanActivity is used to scan the document.
      Example Document Scan

            * This method will scan Passport or Id Card
            * Inside the activity Camera permission is required
            * @param activity It will start ScanActivity
            * @param verdiListener It will be callback of the results
            * @param isQrCodeScan by default It will scan Passport. To change it to scan ID Card Pass true
           Verdi.openDocumentScanActivity(requireActivity(), object : VerdiListener{
                override fun onSuccess() {
                override fun onError(exception: Exception) {
                    //show Error
  2. Scan Document with NFC (if NFC is not supported, then SDK skips this step)

  3. Take a selfie:

Above 2 steps taken sequentially by calling Verdi.proceedNfcAndSelfie. The document info from the step 1 should be passed as paramaters for this method.

VerdiRegisterListener.onRegisterSuccess method is called, if successfully passed all the steps. This method has serialNumber parameter passed, so it should be stored locally. When doing the Authorization part, it can be sent together.


                      override fun onRegisterSuccess(serialNumber: String) {
                          AppPreferences.scannerSerialNumber = serialNumber

                      override fun onRegisterError(exception: Exception) {


Authorization happens only after Identification process. The User should only take a selfie, and sent it with the serialNumber from the Identification process.


        object:VerdiListener {
            override fun onSuccess() {


            override fun onError(exception: Exception) {

In the end, Verdi.finalResult object holds all the required final results:


data class FinalResult(
    var livenessScore: Double = 0.0, // if livenessScore > 0.79, then the user is identified
    var similarityScore: Double = 0.0, // if similarityScore > 0.46 then the user is identified
    var passportPhoto: Bitmap? = null, // passportPhoto, if NFC is used during the Identification Process
    var selfiePhoto: Bitmap? = null,
    var personPairList : List<Pair<String, String>>? = ArrayList(), // Key - data name, Value - The user Info
    var addressPairList : List<Pair<String, String>>? = ArrayList() // Key - data name, Value - The address Info


View Github