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. OkayDoc - Mobile SDK
  2. OkayDoc - Mobile SDK - All

Development Guide

Usage

For Android, a valid license key is required to start the process. In OkayDoc, there are two types of document verification:

  • Image

  • Video

Use the ImageConfig for the image verification, and VideoConfig for video verification. The example is shown below:

Config videoConfig = new VideoConfig.Builder()
    .setMyKadThreshold(70)
    .setLandmarkThreshold(10)
    .setHologramThreshold(30)
    .setMinHologramDiff(2)
    .setMinHologramCount(1)
    .setMinLandmarkCount(3)
    .setColorDetection(false)
    .setScreenDetection(false)
    .setContentSubDetection(false)
    .setFaceTamperDetection(false)
    .setMicroprintDetection(false)
    .build();
    
Config imageConfig = new ImageConfig.Builder()
    .setMyKadThreshold(70)
    .setLandmarkThreshold(10)
    .setHologramThreshold(30)
    .setColorDetection(false)
    .setScreenDetection(false)
    .setContentSubDetection(false)
    .setFaceTamperDetection(false)
    .setMicroprintDetection(false)
    .build();
    
Config imagePathConfig = new ImagePathConfig.Builder()
    .setPath("path/to/image.jpg")
    .setMyKadThreshold(70)
    .setLandmarkThreshold(10)
    .setHologramThreshold(30)
    .setColorDetection(false)
    .setScreenDetection(false)
    .setContentSubDetection(false)
    .setFaceTamperDetection(false)
    .setMicroprintDetection(false)
    .build();
    
MyKadDetectionActivity.startDetection(this, LICENSE_KEY, 
MyKadDetectionManager.CameraType.IMAGE, imageConfig, (success, errorCode, result) -> { 
    if (success) {
        Log.d("SAMPLE", "result => " + result);
    } else {
        Log.d("SAMPLE", "error => " + errorCode);
    }
});

Configuration

ImageConfig

There are several Config files that require to configure while developing. ImageConfig will be the first listed below:

Config

Possible Input Range

Default

myKadThreshold

between 1 and 100

70

landmarkThreshold

between 1 and 100

10

hologramThreshold

between 1 and 100

30

setColorDetection

set false to disable color detection

true

setScreenDetection

set false to disable screen detection

true

setFaceTamperDetection

set false to disable face tamper detection

true

setContentSubDetection

set false to disable content substitution detection

true

setMicroprintDetection

set false to disable microprint detection

true

ImagePathConfig

As for the ImagePathConfig, it consists of ImageConfig plus image file path below:

Config

Value

SetPath

Full path to the valid image file

VideoConfig

As for the VideoConfig, it consists of ImageConfig plus the following extra configurations below:

Config

Possible Input Range

Default

minHologramDiff

between 1 and 4

2

minHologramCount

between 1 and 4

1

minLandmarkCount

between 1 and 3

3

setColorDetection

set false to disable color detection

true

setScreenDetection

set false to disable screen detection

true

setFaceTamperDetection

set false to disable face tamper detection

true

setContentSubDetection

set false to disable content substitution detection

true

setMicroprintDetection

set false to disable microprint detection

true

The configurations that left it blank will follow the default values

Result

Result is returned in ArrayList type. If video scanning is selected, there will be 2 MyKads returned: MyKad without flash and with flash. Kindly get hologram count from MyKad with flash as the holograms will be more obvious. You may get the rest of the results from MyKad without flash.

Name

Description

isValidMykad()

Return true if Mykad is valid

getHologramCount()

Number of holograms detected

getLandmarkCount()

Number of landmarks detected

isScreen()

Return true if the screen is detected

isColor()

Return true if the image is not black and

white

isFaceTampered()

Return true if the face is tempered

isContentSubstituted()

Return true if the content is substituted

isMicroprint()

Return true if the microprint is detected

Error Code

These are the error code that will be raised after process is completed.

Error Code

Constant Name

-1

MyKad.NO_ERROR

1

MyKad.ERROR_INVALID_LICENSE_KEY

2

MyKad.ERROR_PERMISSION_DENIED

3

MyKad.ERROR_USER_CANCEL_ACTION

4

MyKad.ERROR_INVALID_IMAGE

5

MyKad.ERROR_MYKAD_NOT_IN_VIEW

PreviousInstallation GuideNextChange Log

Last updated 3 years ago

Was this helpful?