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

Related tags

App mobileverdysdk
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...
A simple Android app to demonstrate the use of Hover SDK for M-PESA Send Money while offline. This SDK does not require an internet connection, it automates USSD sessions in the background of an android application.

HoverSDKDemo Hover SDK is an Android SDK that lets mobile developers to add money features to the applications. This SDK does not require an internet

Unity-Android-SDK-Plugins - Android SDK/Library/Plugins (aar) for Unity Developers

Unity Android SDK Plugins Unity Android SDK Plugins is an Open Source project th

Wallpaper4kapp - Wallpaper app get photo using Api From pexels
Wallpaper4kapp - Wallpaper app get photo using Api From pexels

wallpaper4kapp this is wallpaper app , get photo using Api From https://api.pexe

This component allows you to interact with remote machine via SSH. You can execute commands or run scripts located on that machine

th2 act ssh (1.2.0) Overview Provides user with the ability to execute specified scripts or commands with the parameter he needs Custom resources for

AlarmIT is a simple alarm app. The alarms can be turned off via three methods - normal turnoff, by shaking the device a number of times, by solving maths questions.
AlarmIT is a simple alarm app. The alarms can be turned off via three methods - normal turnoff, by shaking the device a number of times, by solving maths questions.

Kicking Off Hacktoberfest with ACM-VIT! AlarmIT AlarmIT is a simple alarm app. The alarms can be turned off via three methods - normal turnoff, by sha

The app has got fullscreen Turkey map via Huawei Map. App selects random province and shows it borders on the map than user will try to guess the provinces name.
The app has got fullscreen Turkey map via Huawei Map. App selects random province and shows it borders on the map than user will try to guess the provinces name.

Il Bil App Introduction I will introduce you to how to implement Account Kit, Map Kit, Game Service. About the game: The app has got fullscreen Turkey

A manga reader app that can be used save / search / find and read latest manga / manhwa
A manga reader app that can be used save / search / find and read latest manga / manhwa

A manga reader app that can be used save / search / find and read latest manga / manhwa

Better P2P and memory card for Applied Energistics 2, requires Forgelin.
Better P2P and memory card for Applied Energistics 2, requires Forgelin.

BetterP2P Better P2P and memory card for Applied Energistics 2, requires Forgelin. Documentation is now available to read: https://lasmgratel.github.i

Sample app that displays a birthday card with text and an image

Birthday Card App Sample app that displays a birthday card with text and an image. Used in the Android Basics with Kotlin course. Pre-requisites Andro

Releases(v1.0.3)
Owner
null
Simple Application that helps individuals prioritize by directly comparing items in a list and ranking their importance to the individual

Analysis.Paralysis Simple Application that helps individuals prioritize by directly comparing items in a list and ranking their importance to them. Cu

Ryan Foster 0 Jun 19, 2022
Daily Doc is a Productivity Note App utilizing Jetpack Compose

Daily Doc is a productivity app to help you keep track of your daily progress inspired by 100-day-challenges.

Bryan L 31 Dec 16, 2022
This project consists in the approach of a bakery business, in which the user can book one or more products (cakes), in addition to having the method of payment in cash (post-shipment) or the method of payment via mobile

This project consists in the approach of a bakery business, in which the user can book one or more products (cakes), in addition to having the method of payment in cash (post-shipment) or the method of payment via mobile

Paul Guillen Acuña 2 Dec 20, 2022
In this You can Calculate Your Age and that Age will be Appear on Birthday Card with Message.

CalculateAge & Create Birthday Card This is the Extension Version of BirthdayCard In this You can Calculate Your Age and that Age will be Appear on Bi

GDSC Indus University 1 Oct 8, 2021
You can store all your password, bank details, card details in one place and remember only one master PIN. The application works totally offline.

Keep Password An application where you can store all your password, bank details, card details in one place and remember only one master PIN. The appl

rıdvan 4 Apr 18, 2022
An android & arduino project. The android app is used to control motors via Arduino.

Boccia ramp project An android & arduino project. The android app is used to control motors via Arduino. Description This project is made in the conte

vql 2 Jul 29, 2022
Quick photo and video camera with a flash, customizable resolution and no ads.

Simple Camera A camera with flash, zoom and no ads. The camera is usable for both photo taking and video recording. You can switch between front and r

Simple Mobile Tools 644 Dec 26, 2022
🌄 Photo editor using native modules for iOS and Android. Inherit from 2 available libraries, Brightroom (iOS) and PhotoEditor (Android)

React Native Photo Editor (RNPE) ?? Image editor using native modules for iOS and Android. Inherit from 2 available libraries, Brightroom (iOS) and Ph

Baron Ha. 242 Dec 28, 2022
Browse your memories without any interruptions with this photo and video gallery

Simple Gallery Simple Gallery Pro is a highly customizable lightweight gallery loved by millions of people for its great user experience. Organize and

Simple Mobile Tools 2.8k Jan 4, 2023
Android application that allows users to take or import photo of chessboard, recognizes the pieces and generate the Forsyth-Edwards Notation.

♛ ChessBoard Importer Frontend ♛ Repository for the frontend part of project "Chessboard Importer". The project is realized by the team of 4 students

null 8 Feb 26, 2022