Innov8tif EMAS EKYC APIs
  • EMAS eKYC API
  • Innov8tif EMAS eKYC APIs Process Flow
  • OkayID
    • OkayID - Overall
    • OCR
      • Change Log
      • Version 3
      • Version 2
      • Version 1
    • Get Document Type
    • Document Type
      • Brunei
      • Cambodia
      • Indonesia
      • Malaysia
      • Myanmar
      • Philippines
      • Singapore
      • Thailand
      • United Arab Emirates
      • Vietnam
    • Field Type Reference
      • FieldType List
      • Brunei
      • Cambodia
      • Indonesia
      • Malaysia
      • Myanmar
      • Philippines
      • Singapore
      • Thailand
      • United Arab Emirates
      • Vietnam
      • Passport
    • Error List
    • Image Requirements
  • OkayID Lite
    • Indonesia
      • Version 1
    • Malaysia
      • Version 1
    • Thailand
      • Version 1
    • OCR(Non-Roman Character)
      • Version 1
    • Image Requirements
  • OKAYID LITE - MOBILE SDK
    • Getting Started with OkayID Lite
    • Installation Guide
    • Development
    • Changelog
  • OkayLive++
    • Anti-spoofing
  • OkayLive
    • Anti-spoofing
      • Change Log
      • Version 1
  • OkayFace
    • OkayFace - Overall
    • Face Verification
      • Version 1
    • 1:1 Face Verification V2
      • Change Log
    • 1:1 Face Verification V3
      • Change Log
    • 1:1 Face Verification V4
      • Change Log
    • 1:1 Face Verification V2-1
      • Change Log
    • 1:1 Face Verification V2-2
      • Change Log
    • 1:1 Face Verification V3-1
      • Change Log
    • 1:1 Face Verification V4-1
      • Change Log
    • Image Requirements
    • Error List
    • Face Search [BETA TESTING]
      • Face Insert
      • Face Query
      • Change Log
  • Face Detector - Mobile SDK
  • Getting Started with Face Detector
  • Installation Guide
  • Development
  • Changelog
    • Android
    • iOS
    • React-Native
  • OkayDoc
    • OkayDoc - Overall
    • Brunei
      • BN - Domestic ID Card
        • Change Log
        • Version 1
        • Recommended Threshold And Sample for Landmarks
      • BN - Permanent ID Card
        • Change Log
        • Version 1
        • Recommended Threshold And Sample for Landmarks
    • Cambodia
      • KH - ID Card Front
        • Change Log
        • Version 2
        • Version 1
        • Recommended Threshold And Sample for Landmarks
      • KH - ID Card Back
        • Change Log
        • Version 2
        • Version 1
        • Recommended Threshold And Sample for Landmarks
    • Indonesia
      • IDN - e-KTP Front
        • Change Log
        • Version 2
        • Version 1
        • Recommended Threshold And Sample for Landmarks
      • IDN - e-KTP Back
        • Change Log
        • Version 2
        • Version 1
        • Recommended Threshold And Sample for Landmarks
    • Malaysia
      • MYS - MyKad Front
        • Change Log
        • Version 7
        • Version 6
        • Version 5.1(Deprecated)
        • Version 5(Deprecated)
        • Version 3(Deprecated)
        • Recommended Threshold And Sample for Landmarks
        • holoFace and idFace Samples
      • MYS - MyKad Back
        • Change Log
        • Version 1
        • Recommended Threshold And Sample for Landmarks
      • MYS - MyKas
        • Change Log
        • Version 2
        • Version 1
        • Recommended Threshold And Sample for Landmarks
      • MYS - MyPR
        • Change Log
        • Version 2
        • Version 1
        • Recommended Threshold And Sample for Landmarks
      • MYS - MyTentera
        • Change Log
        • Version 2
        • Version 1
        • Recommended Threshold And Sample for Landmarks
      • MYS - Driving License
        • Change Log
        • Version 1
        • Recommended Threshold And Sample for Landmarks
      • MYS - MyOKU(beta)
        • Change Log
        • Version 1
        • Recommended Threshold And Sample for Landmarks
    • Myanmar
      • MM - Driving License
        • Change Log
        • Version 1
        • Recommended Threshold And Sample for Landmarks
    • Philippines
      • PH - Driving License
        • Change Log
        • Version 2
        • Version 1
        • Recommended Threshold And Sample for Landmarks
      • PH - SSS
        • Change Log
        • Version 2
        • Version 1
        • Recommended Threshold And Sample for Landmarks
      • PH - PRC Professional ID Card
        • Change Log
        • Version 2
        • Version 1
        • Recommended Threshold And Sample for Landmarks
      • PH - UMID
        • Change Log
        • Version 2
        • Version 1
        • Recommended Threshold And Sample for Landmarks
      • PH - Voter ID
        • Change Log
        • Version 1
        • Recommended Threshold And Sample for Landmarks
      • PH - Postal ID
        • Change Log
        • Version 1
        • Recommended Threshold And Sample for Landmarks
    • Singapore
      • SG - NRIC Front
        • Change Log
        • Version 2-1
        • Version 2
        • Version 1
        • Recommended Threshold And Sample for Landmarks
      • SG - NRIC Back
        • Change Log
        • Version 1
        • Recommended Threshold And Sample for Landmarks
    • Thailand
      • TH - ID Card
        • Change Log
        • Version 2
        • Version 1
        • Recommended Threshold And Sample for Landmarks
    • United Arab Emirates
      • UAE - ID Card
        • Change Log
        • Version 1
        • Recommended Threshold And Sample for Landmarks
    • Vietnam
      • VN - Old ID Card
        • Change Log
        • Version 2
        • Version 1
        • Recommended Threshold And Sample for Landmarks
      • VN - New ID Card
        • Change Log
        • Version 2
        • Version 1
        • Recommended Threshold And Sample for Landmarks
    • Non Passport
      • Change Log
      • Version 1
    • Passport
      • Change Log
      • Version 3
      • Version 2
      • Version 1
      • Recommended Threshold for Landmarks
      • Landmarks checked for Passport
      • Half-sized and Full-sized Passport Image Samples
    • Data Consistency Check
      • Version 1
      • Passport MRZ-Visual Consistency Check and MRZ Validity
    • Error List
    • Supported Documents and Check Type
    • Image Requirements
  • OkayDoc - Mobile SDK
    • Getting Started with OkayDoc
    • Installation Guide
    • Development
    • Changelog
  • OkayCam - Mobile SDK
    • Getting Started with OkayCam
    • Installation Guide
    • Development (Document Capture)
    • Development (Face Capture)
    • Error/Exception Handling
    • Changelog
      • Android
      • iOS
      • React-Native
  • OkayDB
    • OkayDB -Overall
    • AML
      • Search Business
        • Version 1
      • Search By BusinessID
        • Version 1
      • Search Person
        • Version 1
      • Search By Person ID
        • Version 1
      • Save Result as PDF
        • Version 1
      • Postman Collection
    • Indonesia
      • e-KTP Check
        • Version 1
    • Malaysia
      • Information Check
        • Version 3
        • Version 2
        • Version 1
    • Vietnam
      • Driver License Check
        • Version 1
  • Other
    • OkayID Web Camera
      • HTML Media Capture - Upload Approach
      • Web RTC - High Resolution
      • Web RTC - Screen Capture
      • Operating System Detection
    • OkayLive Web Camera
    • IDV App URL
    • ID Collection Application
    • FAQ
  • Other API
    • Get Details by ID
    • Fake ID Detection
  • EMAS eKYC Portal
    • Create JourneyID
    • Centralized OkayID
    • Centralized OkayFace
    • Centralized OkayFace(v1-1)
    • Centralized OkayLive
    • Centralized OkayDoc
      • Non-passport
      • Passport
    • Get Scorecard Result
    • Get Scorecard Config
    • Postman Collection
    • Error List
Powered by GitBook
On this page

Was this helpful?

  1. OKAYID LITE - MOBILE SDK

Development

This page contains the information on Usage, Configuration, Result of OkayID Lite in Android, iOS and React-native

Usage

For Android, a valid license key is required to start the process.

Java
Config config = new Config.Builder()
                .setExtractAddress(true)
                .setExtractGender(true)
                .setExtractReligion(true)
                .build();

OkayLiteActivity.startMyKadScanning(this, LICENSE_KEY, config, new OkayLiteResultListener() {
    @Override
    public void onResultReceived(boolean isSuccess, int errorCode, MyKadResult result) {
        Logger.d("result => " + result);
        if (isSuccess) {
            //do something with success result
        } else {
            //do something with error
        }
    }
});

Kotlin
//By default it is true
val config = Config.Builder()
    .setExtractAddress(false)
    .setExtractReligion(false)
    .setExtractGender(false)
    .build()
        
OkayLiteActivity.startMyKadScanning(this, LICENSE_KEY,config,
{ isSuccess, errorCode, result ->
    if (isSuccess) {
        //do something with success result
    } else {
        //do something with error
    }
})

The configurations by default are set as "true"

Result

These are the explanation of the results that the OkayID Lite will be returning as follow:

Property

Description

fullName

Full name

icNumber

IC number

gender

Gender

dob

Date of Birth

religion

Religion

address

Full address

fullDocumentPath

Path to the full document image captured

during the scanning process

Error Code

These are the error code that will be raised after each of the scanned is done.

Error Code

Constant Name

Description

-1

MyKadResult.NO_ERROR

MyKad has been successfully scanned

1

MyKadResult.ERROR_INVALID_LICENSE_KEY

The license is invalid

2

MyKadResult.ERROR_PERMISSION_DENIED

The user does not grant permission to access the camera and storage in order to do OCR

3

MyKadResult.ERROR_USER_CANCEL_ACTION

The user cancels during the scanning process (eg. user press back button)

Usage

For iOS, there are a few steps that needed to be followed as below:

  • Then, import "OkayIDLite" module into the swift file.

import OkayIDLite
  • After that, build the configuration object as follow:

let config = Config.Builder()
    .setExtractAddress(true) // Toggle address extraction
    .setExtractGender(true) // Toggle gender extraction
    .setExtractReligion(true) // Toggle religion extraction
    .build()
  • Then, start the process by calling "startMyKadScanning" on the OkayIDLite class with the config object. It is also a must to pass a valid license string and a reference to the view controller. The "self" is referring to the current view controller in the example below:

OkayIDLiteSDK.startMyKadScanning(
    viewController: self,
    license: lic,
    config: config
)
{ success, errorCode, result in
    if(success) {
        // handle success
    } else {
        // handle error
    }
}

Code above is an example to handle the success or failure of the MyKad scanning that the action can be customized by the user.

If it is not successful, the result will be returning nil

Result

These are the explanation of the results that the OkayID Lite will be returning as follow:

Property

Description

fullName

Full name

icNumber

IC number

gender

Gender

dob

Date of Birth

religion

Religion

address

Full address

fullDocumentPath

Path to the full document image captured

during the scanning process

Error Code

These are the error code that will be raised after each of the scanned is done.

Error Code

Constant Name

Description

-1

MyKadResult.NO_ERROR

MyKad has been successfully scanned

1

MyKadResult.ERROR_INVALID_LICENSE_KEY

The license is invalid

2

MyKadResult.ERROR_PERMISSION_DENIED

The use did not grant permission to access the camera in order to do OCR

3

MyKadResult.ERROR_USER_CANCEL_ACTION

The user cancelled during the scanning process

4

MyKadResult.ERROR_UNSUPPORTED_CAMERA_PRESET

The device's camera does not support the required preset for video OCR

Usage

For React-native, this is an example for the document capture for the custom camera UI design as following:

import RNOkayidLite from "react-native-okayid-lite"

//By default it is true
RNOkayidLite.startMykadScanning({
    license: license,
    extractAddress: false,
    extractGender: false,
    extractReligion: false
})
    .then(result => {
        console.log(result)
    })
    .catch(error => {
        console.log(error)
    })

Configuration

There are some configurations object to be followed in the development stage. The configurations that are going to show below can be implemented into the Usage section above.

Result

Property

Description

fullName

Full name

icNumber

IC number

gender

Gender

dob

Date of birth

religion

Religion

address

Full address

fullDocumentImage

Path to the full document image captured during the scanning process

Error Code

Error

Description

invalid license

The license is invalid

permission denied

The user did not grant permission to access the camera in order to do OCR

cancel

The user cancelled during the scanning process

failed

Unexpected error

unsupported camera preset (iOS Only)

The device's camera does not support the required preset for video OCR.

PreviousInstallation GuideNextChangelog

Last updated 3 years ago

Was this helpful?