Development Guide

This page shows the development guide of the OkayID NFC

Usage

  1. Retrieve the MRZKey by passing passport number, date of birth, and expiry date

val mrzKey = PassportUtils().getMRZKey("A32869311", "890921", "190528")
  1. License key is needed to trigger the process. Start the process by calling readPassport on PassportReader. After process finished successfully or with an error, the callback method will be inovked with the results

PassportReader.readPassport(this, LICENSE_KEY, mrzKey) { success, passport, error ->  
	Log.d("RESULT", "issuccess =>" + success)  
    Log.d("RESULT", "data =>" + passport)  
    Log.d("RESULT", "err =>" + error)  
}

MRZ key

Parameter
Type
Required format

passportNumber

String

dateOfBirth

String

yyMMdd

dateOfExpiry

String

yyMMdd

*Note: if expiry date is 21 SEPT 2022, the valid format to pass is 220921

Result callback

  • result callback has 3 params as follow:

Params
Possible value

success

will be true if the process finish successfully ,otherwise false

passport

if its successful,the passport object will contains the info described in the following table. Otherwise, passport will be null

exception

if its successful, exception will be null otherwise, it contains the exception that occurred during the process

After the successful processing, you will be able to retrieve the following info:

Parameter
Type

documentType

String

documentNumber

String

personalNumber

String

name

String

gender

String

nationality

String

dateOfBirth

String

documentExpiryDate

String

faceImgPath

String

Last updated