This SDK can be used to identify a user via passport or ID Card prove identity of user via Biometry comparing selfie and photo from chip of ID Doc

Overview

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.

Implementation

root build.gradle:

allprojects {
    repositories {
	    //...
		maven { url 'https://jitpack.io' }
	}
}

build.gradle:

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" />

Usage

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
            .Builder()
            .locale("uz") // uz, ru, en
            .appId("Your App Id")
            .build()
        Verdi.init(applicationContext, config)

HttpLoggingInterceptor can be enabled

   Verdi.logs = BuildConfig.DEBUG

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

Identification

  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.

    Example

        val isEachFieldValid =
            DocumentInputValidation.isInputValid(DocumentInputType.PASSPORT(passportSeries)) &&
                DocumentInputValidation.isInputValid(DocumentInputType.BIRTHDAY(dateOfBirth)) &&
                    DocumentInputValidation.isInputValid(DocumentInputType.EXPIRATION(dateOfExpiry))
    • 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() {
                    binding.etDocumentNumber.setText(Verdi.user.serialNumber)
                    binding.etDateOfBirth.setText(Verdi.user.birthDate)
                    binding.etDateOfExpiry.setText(Verdi.user.dateOfExpiry)
                }
      
                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.

Example

Verdi.proceedNfcAndSelfie(
                  requireActivity(),
                  viewModel.passportSeries,
                  viewModel.dateOfBirth,
                  viewModel.dateOfExpiry,
                  object:VerdiRegisterListener{
                      override fun onRegisterSuccess(serialNumber: String) {
                          AppPreferences.scannerSerialNumber = serialNumber
                      }

                      override fun onRegisterError(exception: Exception) {
                      }
                  }
              )

2.Authorization

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

Example

    Verdi.openSelfieActivity(
        requireActivity(), 
        object:VerdiListener {
            override fun onSuccess() {

            }

            override fun onError(exception: Exception) {
            
            }
        },
        AppPreferences.scannerSerialNumber
    )

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

Example

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
)
You might also like...
Android Real Time Chat & Messaging SDK
Android Real Time Chat & Messaging SDK

Android Chat SDK Overview Applozic brings real-time engagement with chat, video, and voice to your web, mobile, and conversational apps. We power emer

Evernote SDK for Android

Evernote SDK for Android version 2.0.0-RC4 Evernote API version 1.25 Overview This SDK wraps the Evernote Cloud API and provides OAuth authentication

Android Chat SDK built on Firebase
Android Chat SDK built on Firebase

Chat21 is the core of the open source live chat platform Tiledesk.com. Chat21 SDK Documentation Features With Chat21 Android SDK you can: Send a direc

Liquid SDK (Android)

Liquid Android SDK Quick Start to Liquid SDK for Android This document is just a quick start introduction to Liquid SDK for Android. We recommend you

AWS SDK for Android. For more information, see our web site:

AWS SDK for Android For new projects, we recommend interacting with AWS using the Amplify Framework. The AWS SDK for Android is a collection of low-le

新浪微博 Android SDK

ReadMe 公告: 鉴于线上服务器出现问题,推荐下载本地aar后上传到自己公司的服务器,保证后续服务稳定, 我们也将尽快重新提供一个稳定的地址供大家使用。 新包地址:https://github.com/sinaweibosdk/weibo_android_sdk/tree/master/2019

Free forever Marketing SDK with a dashboard for in-app SplashScreen banners with built-in analytics
Free forever Marketing SDK with a dashboard for in-app SplashScreen banners with built-in analytics

AdaptivePlus Android SDK AdaptivePlus is the control center for marketing campaigns in mobile applications Requirements minSdkVersion 16 Examples prov

Official Appwrite Android SDK 💚  🤖
Official Appwrite Android SDK 💚 🤖

Appwrite Android SDK This SDK is compatible with Appwrite server version 0.8.x. For older versions, please check previous releases. Appwrite is an ope

This App is sending Face capture data over network, built around the latest Android Arcore SDK.
This App is sending Face capture data over network, built around the latest Android Arcore SDK.

AndroidArcoreFacesStreaming From any Android phone ArCore compatible, using this app will send over TCP 5680 bytes messages: The first 5616 bytes is a

Releases(v1.0.3)
Owner
null
card.io provides fast, easy credit card scanning in mobile apps

card.io SDK for Android card.io provides fast, easy credit card scanning in mobile apps. Stay up to date Please be sure to keep your app up to date wi

card.io 2k Jan 1, 2023
Project of an sdk user, for default implementations of login/register user

Login_Manager Project of an sdk user, for default implementations of login/register user Implementation For use, is necessary: configure the feature c

null 0 Feb 5, 2022
Sdk-android - SnapOdds Android SDK

Documentation For the full API documentation go to https://snapodds.github.io/sd

Snapodds 0 Jan 30, 2022
Segmenkt - The SegmenKT Kotlin SDK is a Kotlin-first SDK for Segment

SegmenKT Kotlin SDK The SegmenKT Kotlin SDK is a Kotlin-first SDK for Segment. I

UNiDAYS 0 Nov 25, 2022
Frogo SDK - SDK Core for Easy Development

SDK for anything your problem to make easier developing android apps

Frogobox 10 Dec 15, 2022
HubSpot Kotlin SDK 🧺 Implementation of HubSpot API for Java/Kotlin in tiny SDK

HubSpot Kotlin SDK ?? Implementation of HubSpot API for Java/Kotlin in tiny SDK

BOOM 3 Oct 27, 2022
CodingChallenge: A simple SDK. Which can provide you information related to Start Wars APi

CodingChallenge CodingChallenge is a simple SDK. Which can provide you informati

Wajahat Hussain 1 Feb 18, 2022
Air Native Extension (iOS and Android) for the Facebook mobile SDK

Air Native Extension for Facebook (iOS + Android) This is an AIR Native Extension for the Facebook SDK on iOS and Android. It has been developed by Fr

Freshplanet 219 Nov 25, 2022
AWS SDK for Android. For more information, see our web site:

AWS SDK for Android For new projects, we recommend interacting with AWS using the Amplify Framework. The AWS SDK for Android is a collection of low-le

AWS Amplify 976 Dec 29, 2022
Countly Product Analytics Android SDK

Countly Android SDK We're hiring: Countly is looking for Android SDK developers, full stack devs, devops and growth hackers (remote work). Click this

Countly Team 648 Dec 23, 2022