Liveness Detection SDK Cordova plugin Integration Guide

Integration Documentation for Cordova Compatible with Liveness Detection V4.x Version.

Overview-Android

Overview-iOS

SDK requirements and limitations as below:

Compliance Explanation

Click to view the compliance explanation

Release Notes

Click to show release notes

Demo

Install IDV-Demo.apk to your phone and log in with the test account.

Migration Guides

If you are upgrading from an older version of the Liveness SDK, please refer to this document to understand the changes.

Installation

  1. Add the dependency in your React Native project’s package.json file.
  1. Run cordova plugin rm liveness-plugin-cordova if it has been integrated before
  2. Run cordova plugin add liveness-plugin-cordova

For iOS, you need to do:

  1. Run pod install to install the dependencies in your project.

  2. Add camera usage description in Info.plist as bellow. Ignore this step if you have added those.

Usage

  1. Initialization SDK.

  2. Check license

    The license is obtained by your server calling our openAPI, you need to check license before starting the liveness detection activity.

  3. You can create SDK launch parameters using the method below. Note that the function below is a complete example, including the SDK initialization and license check mentioned above. You can refer to it directly.

Customization (iOS)

The following customization options are currently supported on iOS only.

Language

Set the SDK display language via the language parameter. Supported values: "en", "zh-Hans", "id", "vi", "th", "es", "ms", "hi", "fil". If not set, the SDK follows the device system language.

Custom Prompt Text

Use localizedStrings to override specific SDK prompt texts. Keys follow the format "<language>.<key>". Only entries matching the effective language (from language or system language) are applied.

Some commonly used keys (examples):

KeyDefault (en)
no_facePlease put your face in the frame
move_closerGet closer
move_furtherStep back
stay_stillHold steady
pls_blinkPlease blink
pls_open_mouthPlease open your mouth and then close
low_lightGo to a brighter area
warn_muti_faceMultiple faces detected from the image, please only keep one face in the image

For the complete list of available keys, refer to the Localizable.strings file bundled with the SDK after running pod install:

Custom Font

Use font to customize the font of the state-hint label. fontName must be a valid PostScript name of a font registered in your app. If the font cannot be found, the SDK default font is used.

Customization (Android)

See FAQ for Android UI customization.

Error Code

See Error Code