LogoLogo
  • Innov8tif eKYC Individual APIs & Mobile SDK
  • Centralized API - EMAS eKYC Portal
  • OkayID
    • OkayID - All
      • OCR API
        • Versions
        • Sample Input
        • Sample Response
      • Get Document Type API
        • Versions
        • Sample Input
        • Sample Response
        • Supported Document Type
          • Brunei
            • Sample Response
          • Cambodia
            • Sample Response
          • China
            • Sample Response
          • Hong Kong
            • Sample Response
          • Indonesia
            • Sample Response
          • Malaysia
            • Sample Response
          • Myanmar
            • Sample Response
          • Philippines
            • Sample Response
          • Singapore
            • Sample Response
          • Thailand
            • Sample Response
          • United Arab Emirates
            • Sample Response
          • Vietnam
            • Sample Response
          • Passport
            • Sample Response
      • Field Type Reference
        • Field Type Lists
        • MRZ-Visual FieldType on Nationality
        • Supported Documents
          • Brunei
          • Cambodia
          • China
          • Hong Kong
          • Indonesia
          • Malaysia
          • Myanmar
          • Philippines
          • Singapore
          • Thailand
          • United Arab Emirates
          • Vietnam
          • Passport
      • Document Type Information
      • Error Lists
      • Image Requirements
      • Change Log
      • FAQ
  • OkayID-Lite
    • OkayID-Lite - All
      • Supported Countries
        • Indonesia
          • Versions
          • Sample Input
          • Sample Response
        • Malaysia (Deprecated)
          • Versions
          • Input Sample
          • Sample Response
        • Thailand
          • Versions
          • Sample Input
          • Sample Response
        • Japan (Non-Roman Characters)
          • Versions
          • Sample Input
          • Sample Response
        • Cambodia (Non-Roman Character)
          • Versions
          • Sample Input
          • Sample Response
          • Change Log
      • Supported DocType
      • Image Requirements
      • Change Log
      • Malaysia's Electricity Bill OCR
        • Sample Input
        • Sample Response
        • Supported Document Type
        • Error Lists
        • Change Log
      • Malaysia's KWSP Document (BETA)
        • Sample Input
        • Sample Response
        • FieldType Lists
        • Supported Document Type
        • Error Lists
        • Change Log
      • Malaysia's LHDN Document (BETA)
        • Sample Input
        • Sample Response
        • FieldType Lists
        • Supported Document Type
        • Error Lists
        • Change Log
  • OkayID - Mobile SDK
    • OkayID NFC Mobile SDK - All
      • Getting Started with OkayID NFC Mobile SDK
      • Installation Guide
      • Development Guide
      • Change Log
        • Android
        • iOS
    • OkayID Lite Mobile SDK - All
      • Getting Started with OkayID Lite Mobile SDK
      • Installation Guide
      • Development Guide
      • Changelog
  • OkayLive
    • OkayLive - All
      • Anti-spoofing
        • Versions
        • Sample Input
        • Sample Response
      • Error Lists
      • Image Requirement
      • Change Log
      • FAQ
  • OkayLive++
    • OkayLive++ - All
      • Anti-spoofing
        • Versions
        • Sample Input
        • Sample Response
      • Error Lists
      • Image Requirement
      • Change Log
  • OkayFace
    • OkayFace - All
      • Face Verification
        • Versions
        • Sample Input
        • Sample Response
        • Change Log
      • Interpretation of Results
      • Thresholding
      • Image Requirements
      • Error Lists
      • Face Search [Deprecated]
        • Face Insert
          • Sample Input
        • Face Query
          • Sample Input
        • Thresholding
        • Change Log
      • FAQ
  • OkayFace Search
    • OkayFace Search - All
      • Search Face API
        • Versions
        • Sample Input
        • Sample Response
        • Change Log
      • Get Token API
        • Versions
        • Sample Input
        • Sample Response
        • Change Log
      • How to encrypt and decrypt data
      • OkayFace Search Scenarios
      • FS-Interpretation of Results
      • FS-Image Requirements
      • FS-Error Lists
  • Face Detector - Mobile SDK
    • Face Detector - Mobile SDK - All
      • Getting Started with Face Detector
      • Installation Guide
      • Development Guide
      • Change Log
        • Android
        • iOS
        • React-Native
  • OkayDoc
    • OkayDoc - All
      • Supported Documents
        • Brunei
          • BN - Domestic ID Card
            • Versions
            • Sample Input
            • Sample Response
            • Sample for Landmarks
            • Recommended Threshold
            • Change Log
          • BN - Permanent ID Card
            • Versions
            • Sample Input
            • Sample Response
            • Sample for Landmarks
            • Recommended Threshold
            • Change Log
        • Cambodia
          • KH - ID Card Front
            • Versions
            • Sample Input
            • Sample Response
            • Sample for Landmarks
            • Recommended Threshold
            • Change Log
          • KH - ID Card Back
            • Versions
            • Sample Input
            • Sample Response
            • Sample for Landmarks
            • Recommended Threshold
            • Change Log
        • China
          • CN - ID Card Front
            • Versions
            • Sample Input
            • Sample Response
            • Example for Landmark
            • Recommended Threshold
            • Change Log
          • CN - ID Card Back
            • Versions
            • Sample Input
            • Sample Response
            • Example for Landmark
            • Recommended Threshold
            • Change Log
        • Taiwan
          • TW - ID Card Front
            • Versions
            • Sample Input
            • Sample Response
            • Example for Landmark
            • Recommended Threshold
            • Change Log
          • TW - ID Card Back
            • Versions
            • Sample Input
            • Sample Response
            • Example for Landmark
            • Recommended Threshold
            • Change Log
        • Hong Kong
          • HK - ID Card Front
            • Versions
            • Sample Input
            • Sample Response
            • Recommended Threshold
            • Example for landmark
            • Change Log
          • HK - ID Card Back
            • Versions
            • Sample Input
            • Sample Response
            • Recommended Threshold
            • Example for landmark
            • Change Log
        • Indonesia
          • IDN - e-KTP Front
            • Versions
            • Sample Input
            • Sample for Landmarks
            • Sample Response
            • Recommended Threshold
            • Change Log
          • IDN - e-KTP Back
            • Versions
            • Sample Input
            • Sample Response
            • Sample for Landmarks
            • Recommended Threshold
            • Change Log
          • IDN - Driving License (2019) Front
            • Versions
            • Sample Input
            • Sample for Landmarks
            • Sample Response
            • Recommended Threshold
            • Change Log
          • IDN - Driving License (2019) Back
            • Versions
            • Sample Input
            • Sample for Landmarks
            • Sample Response
            • Recommended Threshold
            • Change Log
        • Malaysia
          • MYS - MyKad Front
            • Versions
            • Sample Input
            • Sample Response
            • Detection and Thresholding Sample
            • Recommended Threshold
            • Change Log
          • MYS - MyKad Back
            • Versions
            • Sample Input
            • Sample Response
            • Sample for Landmarks
            • Recommended Threshold
            • Change Log
          • MYS - MyKas
            • Versions
            • Sample Input
            • Sample for Landmarks
            • Sample Response
            • Recommended Threshold
            • Change Log
          • MYS - MyKas Back
            • Versions
            • Sample Input
            • Sample for Landmarks
            • Sample Response
            • Recommended Threshold
            • Change Log
          • MYS - MyPR
            • Versions
            • Sample Input
            • Sample Response
            • Sample for Landmarks
            • Recommended Threshold
            • Change Log
          • MYS - MyPR Back
            • Versions
            • Sample Input
            • Sample Response
            • Sample for Landmarks
            • Recommended Threshold
            • Change Log
          • MYS - MyTentera
            • Versions
            • Sample Input
            • Sample Response
            • Sample for Landmarks
            • Recommended Threshold
            • Change Log
          • MYS - MyTentera Back
            • Versions
            • Sample Input
            • Sample Response
            • Sample for Landmarks
            • Recommended Threshold
            • Change Log
          • MYS - Driving License
            • Versions
            • Sample Input
            • Sample Response
            • Sample for Landmarks
            • Recommended Threshold
            • Change Log
          • MYS - MyOKU
            • Versions
            • Sample Input
            • Sample Response
            • Sample for Landmarks
            • Recommended Threshold
            • Change Log
          • MYS - MyOKU Back
            • Versions
            • Sample Input
            • Sample Response
            • Sample for Landmarks
            • Recommended Threshold
            • Change Log
          • MYS-MyKid
            • Versions
            • Sample Input
            • Sample Response
            • Sample for Landmarks
            • Recommended Threshold
            • Change Log
          • MYS-MyKid Back
            • Versions
            • Sample Input
            • Sample Response
            • Sample for Landmarks
            • Recommended Threshold
            • Change Log
          • MYS-MyPOCA
            • Versions
            • Sample Input
            • Sample Response
            • Sample for Landmarks
            • Recommended Threshold
            • Change Log
        • Myanmar
          • MM - Driving License
            • Versions
            • Sample Input
            • Sample Response
            • Sample for Landmarks
            • Recommended Threshold
            • Change Log
        • Philippines
          • PH - Driving License
            • Versions
            • Sample Input
            • Sample Response
            • Sample for Landmarks
            • Recommended Threshold
            • Change Log
          • PH - Driving License Back
            • Versions
            • Sample Input
            • Sample Response
            • Recommended Threshold
            • Change Log
          • PH - SSS
            • Versions
            • Sample Input
            • Sample Response
            • Sample for Landmarks
            • Recommended Threshold
            • Change Log
          • PH - SSS Back
            • Versions
            • Sample Input
            • Sample Response
            • Sample for Landmarks
            • Recommended Threshold
            • Change Log
          • PH - UMID
            • Versions
            • Sample Input
            • Sample Response
            • Sample for Landmarks
            • Recommended Threshold
            • Change Log
          • PH - Voter ID
            • Versions
            • Sample Input
            • Sample Response
            • Sample for Landmarks
            • Recommended Threshold
            • Change Log
          • PH - Postal ID
            • Versions
            • Sample Input
            • Sample Response
            • Sample for Landmarks
            • Recommended Threshold
            • Change Log
          • PH - Postal ID Back
            • Versions
            • Sample Input
            • Sample Response
            • Sample for Landmarks
            • Recommended Threshold
            • Change Log
          • PH - PRC Professional ID Card
            • Versions
            • Sample Input
            • Sample Response
            • Sample for Landmarks
            • Recommended Threshold
            • Change Log
          • PH - PRC Professional ID Card Back
            • Versions
            • Sample Input
            • Sample Response
            • Sample for Landmarks
            • Recommended Threshold
            • Change Log
          • PH - National ID/PhilSys
            • Versions
            • Sample Input
            • Sample Response
            • Sample for Landmarks
            • Recommended Threshold
            • Change Log
          • PH - National ID/PhilSys Back
            • Versions
            • Sample Input
            • Sample Response
            • Recommended Threshold
            • Change Log
        • Singapore
          • SG - NRIC/PR Front
            • Versions
            • Sample Input
            • Sample Response
            • Sample for Landmarks
            • Recommended Threshold
            • Additional Information
            • Change Log
          • SG - NRIC/PR Back
            • Versions
            • Sample Input
            • Sample Response
            • Sample for Landmarks
            • Recommended Threshold
            • Change Log
        • Thailand
          • TH - ID Card
            • Versions
            • Sample Input
            • Sample Response
            • Sample for Landmarks
            • Recommended Threshold
            • Change Log
          • TH - ID Card Back
            • Versions
            • Sample Input
            • Sample Response
            • Sample for Landmarks
            • Recommended Threshold
            • Change Log
        • United Arab Emirates
          • UAE - ID Card
            • Versions
            • Sample Input
            • Sample Response
            • Sample for Landmarks
            • Recommended Threshold
            • Change Log
        • Vietnam
          • VN - Old ID Card
            • Versions
            • Sample Input
            • Sample Response
            • Sample for Landmarks
            • Recommended Threshold
            • Change Log
          • VN - New ID Card
            • Versions
            • Sample Input
            • Sample Response
            • Sample for Landmarks
            • Recommended Threshold
            • Change Log
        • Non-passport
          • Versions
          • Sample Input
          • Sample Response
          • Supported Document
          • Flash Image Supported ID Document
          • Change Log
        • Passport
          • Versions
          • Sample Input
          • Sample Response
          • Recommended Threshold
          • Sample Landmarks check for Passport
          • Half-sized and Full-sized Passport Image Samples
          • Change Log
      • Data Consistency Check
        • Versions
        • Sample Response
        • Passport MRZ-Visual Consistency Check and MRZ Validity
        • Change Log
      • Supported Documents and Check Type
      • Error Lists
      • Image Requirements
      • FAQ
  • OkayDoc - Mobile SDK
    • OkayDoc - Mobile SDK - All
      • Getting Started with OkayDoc
      • Installation Guide
      • Development Guide
      • Change Log
  • OkayCam - Mobile SDK
    • OkayCam - Mobile SDK - All
      • Getting Started with OkayCam
      • Installation Guide
      • Development Guide (Document Capture)
      • Development Guide (Face Capture)
      • Error/Exception Handling
      • Change Log
        • Android
        • iOS
        • React-Native
  • OkayDB
    • OkayDB - All
      • AML
        • Search Business
          • Versions
          • Sample Input
          • Sample Response
          • API Response Schema
        • Search By BusinessID
          • Versions
          • Sample Response
        • Search Person
          • Versions
          • Sample Input
          • Sample Response
          • API Response Schema
        • Search By Person ID
          • Versions
          • Sample Response
        • Save Result as PDF
          • Versions
          • Sample Input
          • Sample Response
        • AML Postman Collection
        • Error List
        • Change Log
      • Digital Footprint Analysis
        • Versions
          • Sample Input
          • Sample Response
          • Error Lists
          • Change Log
      • Supported Countries
        • Indonesia
          • e-KTP Check
            • Versions
            • Sample Input
            • Sample Response
            • Change Log
        • Malaysia
          • Information Checks
            • Versions
            • Sample Input
            • Sample Response
            • Change Log
        • Vietnam [NOT SUPPORTED]
          • Driver License Check
            • Versions
            • Sample Input
            • Sample Response
            • Change Log
      • FAQ
  • IntelliDoc
    • IntelliDoc - All
      • Document Recognition
        • Verify
          • Verify - Versions
          • Verify - Sample Input
          • Verify - Sample Response
        • IntelliDoc - Postman Collection
        • IntelliDoc - Error Message List
        • IntelliDoc - Change Log
      • Supported Document & Fields
        • Malaysia
  • Web eKYC
    • Web eKYC - All
      • OkayID Web Camera
        • HTML Media Capture - Upload Approach
        • Web RTC - High Resolution
        • Web RTC - Screen Capture
        • Operating System Detection
      • OkayLive Web Camera
      • Differences of Web eKYC & Native eKYC
  • Other APIs
    • Other APIs - All
      • Fake ID Detection
        • Sample Input
      • Get Details by ID
        • Sample Input
  • Others
    • Others - All
      • IDV App Download URL
        • Change Log
      • FAQ
Powered by GitBook
On this page

Was this helpful?

  1. OkayID - Mobile SDK
  2. OkayID Lite Mobile SDK - All

Development Guide

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()
    

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_PERMISESSION_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)

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

Java
Config config = new Config.Builder()
    

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_PERMISESSION_DENIED

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

3

MyKadResult.ERROR_USER_CANCEL_ACTION

Usage

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

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

  • After that, build the configuration object as follow:

  • 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:

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:

Error Code

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

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

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

  • After that, build the configuration object as follow:

  • 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:

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:

Error Code

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

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

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

  • After that, build the configuration object as follow:

  • 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:

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:UsageThe 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 user 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 OCRMyKad has been successfully scanned

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.

tetet

PreviousInstallation GuideNextChangelog

Last updated 3 years ago

Was this helpful?

import OkayIDLite
let config = Config.Builder()
    .setExtractAddress(true) // Toggle address extraction
    .setExtractGender(true) // Toggle gender extraction
    .setExtractReligion(true) // Toggle religion extraction
    .build()
OkayIDLiteSDK.startMyKadScanning(
    viewController: self,
    license: lic,
    config: config
)
{ success, errorCode, result in
    if(success) {
        // handle success
    } else {
        // handle error
    }
}

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

import OkayIDLite
let config = Config.Builder()
    .setExtractAddress(true) // Toggle address extraction
    .setExtractGender(true) // Toggle gender extraction
    .setExtractReligion(true) // Toggle religion extraction
    .build()
OkayIDLiteSDK.startMyKadScanning(
    viewController: self,
    license: lic,
    config: config
)
{ success, errorCode, result in
    if(success) {
        // handle success
    } else {
        // handle error
    }
}

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

import OkayIDLite
let config = Config.Builder()
    .setExtractAddress(true) // Toggle address extraction
    .setExtractGender(true) // Toggle gender extraction
    .setExtractReligion(true) // Toggle religion extraction
    .build()
OkayIDLiteSDK.startMyKadScanning(
    viewController: self,
    license: lic,
    config: config
)
{ success, errorCode, result in
    if(success) {
        // handle success
    } else {
        // handle error
    }
}