EkycHySdk
, EkycHyConfig
, and EkycHyCallBack
. Specific APIs in these classes are described as below.EkycHySdk
is a class of external APIs for the Identity Verification (App SDK). The main logic is completed with this class.API | Feature Description |
init() | Initializes the SDK. |
release() | Releases resources. |
startEkycCheck() | Starts the identity verification process. |
public static void init(Context context)
Type | Parameter | Description |
Context | context | App context information |
public static void release()
public static void startEkycCheck(final String ekycToken, EkycHyConfig ekycHyConfig,EkycHyCallBack ekycHyCallBack)
Type | Parameter | Description |
String | ekycToken | Token requested from the server, which is used as the unique business credential for this process |
EkycHyConfig | ekycHyConfig | Configuration information for starting this identity verification process |
EkycHyCallBack | ekycHyCallBack | API used to receive the verification result callback |
EkycHyConfig
is the configuration entity class used during the Identity Verification (App SDK) startup, which mainly covers the following attributes:Type | Name | Description | Default Value |
String | licenseName | Name of the license file applied for by client for user authorization | Empty |
int | verAutoTimeOut | Timeout period for card or certificate verification | 20000 milliseconds (20 seconds) |
int | ocrAutoTimeout | Timeout period (milliseconds) for automatic capture in OCR_DETECT_AUTO_MANUAL mode. (Set this parameter to at least 5 seconds, and the upper limit is 30 seconds.) | 20000 milliseconds (20 seconds) |
LanguageStyle | languageStyle | Language setting for this process | LanguageStyle.AUTO |
OcrModeType | ocrModeType | OCR mode, which can be manual, auto, or auto+manual | OcrModeType.OCR_DETECT_MANUAL |
OcrRegionType | ocrType | Card type | null |
Enumerated Value | Description |
HK | Hong Kong (China) identity card |
ML | Malaysian identity card |
PhilippinesDrivingLicense | Philippine driver's license |
PhilippinesVoteID | Philippine voters ID card |
PhilippinesTinID | Philippine TIN ID card |
PhilippinesSSSID | Philippines SSS ID card |
PhilippinesUMID | Philippines UMID card |
IndonesiaIDCard | Indonesian identity card |
MLIDPassport | Passport |
LanguageStyle Value | Description |
LanguageStyle.AUTO | Auto |
LanguageStyle.ENGLISH | English |
LanguageStyle.SIMPLIFIED_CHINESE | Simplified Chinese |
LanguageStyle.TRADITIONAL_CHINESE | Traditional Chinese |
OcrModeType Value | Description |
OCR_DETECT_MANUAL | Manual mode |
OCR_DETECT_AUTO | Auto mode |
OCR_DETECT_AUTO_MANUAL | Auto+Manual mode |
EkycHyCallBack
is a listener class used to receive the result of the identity verification process./*** Identity verification result callback class*/public interface EkycHyCallBack {/*** Result information on successful recognition** @param result: Result data*/void onSuccess(EkycHyResult result);/*** Information on failed identity verification** @param errorCode: Error code@param errorMsg: Error message* @param ekycToken: The token of this process*/void onFail(int errorCode, String errorMsg, String ekycToken);}
EkycHyResult
is the result object returned after the identity verification process succeeds.Type | Name | Description | Default Value |
String | ekycToken | The token of this identity verification process, which can be used to pull key data of the process from the server | Empty |
Error Code | Description |
12000 | The user actively canceled the operation |
12001 | The network request failed |
12002 | Error caused by OCR exception |
12003 | Exception caused by local face detection failure |
12004 | Invalid token |
12005 | Failed to perform local card or certificate verification |
12006 | Failed to initialize the Identity Verification (App SDK) |
12007 | Failed to start parameter verification |
12008 | Failed to return the identity verification result |
12009 | Failed to perform the local identity verification |
Was this page helpful?