Release Notes
Product Announcements
API | Feature Description |
Initialization APIs | |
Releases resources. | |
Start the entire Identity Verification process. | |
Set the event callback during the Selfie Verification process. | |
Set the event callback during the OCR process. |
public static void init(Context context)
Parameter Type | Parameter Name | Parameter Description |
Context | context | App context information |
public static void release()
public static void startEkycCheck(final String ekycToken, EkycHyConfig ekycHyConfig,EkycHyCallBack ekycHyCallBack)
Parameter Type | Parameter Name | Parameter Description |
String | ekycToken | The Token value obtained from the server, serving as the unique business credential for this process. |
ekycHyConfig | Configuration information for initiating the Identity Verification process. | |
ekycHyCallBack | API for receiving authentication result callbacks |
public static void setAuthEventCallBack(HuiYanAuthEventCallBack authEventCallBack)
Parameter Type | Parameter Name | Parameter Description |
HuiYanAuthEventCallBack | authEventCallBack | Event callback API for Selfie Verification |
Methodology | Description |
onMainViewCreate(View) | Callback upon creation of the Selfie Verification main page. |
onMainViewDestroy() | Callback upon destruction of the Selfie Verification main page. |
public static void setOcrEventCallBack(OcrEventListener ocrEventListener)
Parameter Type | Parameter Name | Parameter Description |
OcrEventListener | ocrEventListener | OCR Event Callback API |
Methodology | Description |
onMainViewCreate(View) | Callback upon creation of the OCR main page. |
onMainViewDestroy() | Callback upon destruction of the OCR main page. |
Type | Name | Meaning | Default Value |
String | licenseName | Customer's user authorization License file name | Null |
String | riskLicenseName | Added license configuration for device risk detection. This must be configured when openCheckRiskMode is set to true. | Null |
boolean | openCheckRiskMode | Whether to enable device risk detection: when the input parameter SdkVersion in ApplySdkVerificationToken is set to ENHANCE or PLUS, it must be configured as enabled (true). | false |
int | ocrAutoTimeout | Timeout for automatic capture in OCR_DETECT_AUTO_MANUAL mode (in milliseconds, minimum setting: 5000 ms, internal upper limit: 30000 ms) | 20000 milliseconds (20 seconds) |
languageStyle | Language style of the current process | LanguageStyle.AUTO | |
String | languageCode | Language code, used in conjunction with LanguageStyle.CUSTOMIZE_LANGUAGE. | Null |
long | livenessAutoTimeout | The timeout for selfie verification. | 30000 milliseconds (30 seconds), supporting a range of 10 seconds minimum to 600 seconds maximum. |
boolean | showPrivacyPolicyDialog | Whether to display the privacy policy dialog | true |
boolean | isUseBackCameraOnFaceAuth | Whether to use the rear camera for selfie verification. If light-based liveness detection is enabled, enabling this option will report error 12008. | false |
String | ocrModelPath | OCR model file path. When the OcrSDK-common-model AAR is not imported, this field must be used to specify the external model file path (file name is subject.iap). | Null |
String | faceModelPath | Selfie verification model directory path. When the huiyanmodels AAR is not imported, this field must be used to specify the external model directory path (directory name is face-tracker-v003). | Null |
ocrUiConfig | Custom UI configuration for the OCR interface | null | |
faceAuthUiConfig | Custom UI configuration for the liveness face verification page | null |
EkycHyConfig.setOcrUiConfig().Method name | Parameter Type | Meaning | Default Value |
portraitLayoutResId | int | Portrait layout resource ID | -2 |
portraitThemeResId | int | Portrait theme style resource ID | -2 |
showStatusBar | boolean | Whether to display the status bar | true |
statusBarColor | int | Status bar background color (in 0xFFFFFF format) | -2 |
useDeepColorStatusBarIcon | boolean | Whether to use dark icons for the status bar (to be used with a light-colored status bar) | false |
cardFrameDefaultColor | int | Default state color for the card border (when no card is detected) | -2 |
cardFrameColor | int | Highlight state color for the card border (when recognition is successful) | -2 |
warnErrorTextColor | int | Error state color for the card border and error prompt text color | -2 |
defaultTipTextColor | int | Prompt text color in the card frame area under default state | -2 |
successRemindTextColor | int | Prompt text color in the card frame area under successful recognition state | -2 |
imageSelectResId | int | Album local image selection button icon resource ID | -2 |
lightImageOnResId | int | Flashlight on button icon resource ID | -2 |
lightImageOffResId | int | Close flashlight button icon resource ID | -2 |
takePicturesResId | int | Manual capture button icon resource ID | -2 |
backActionIconResId | int | Back button icon resource ID | -2 |
removeAlbum | boolean | Whether to hide the album image selection feature | false |
removeFlash | boolean | Whether to hide the flashlight button | false |
isShowIdcardLogo | boolean | Whether the ID card scanning frame displays the photo/national emblem Logo | true |
remindDialogText | String | Reminder Dialog text content | "" |
remindDialogTextColor | int | Reminder Dialog text color | -2 |
remindDialogTextSize | int | Reminder Dialog text size | -2 |
remindDialogConfirmText | String | Confirm button text | "" |
remindDialogCancelText | String | Cancel button text | "" |
remindDialogConfirmColor | int | Confirm button color | -2 |
remindDialogCancelColor | int | Cancel button color | -2 |
remindDialogShowTitle | boolean | Whether to display the title of the Reminder Dialog | true |
remindDialogCommonStyle | int | Reminder Dialog overall style Resource ID | -2 |
remindDialogCommonBgColor | int | Reminder Dialog background color | -2 |
remindDialogChangeModeTextOnLeft | boolean | Whether the mode toggle button is displayed on the left side of the Dialog | false |
-2 indicates that this field is not set, and the SDK uses the built-in default value.EkycHyConfig.setFaceAuthUiConfig().Method name | Parameter Type | Meaning | Default Value |
authLayoutResId | int | Portrait identity verification page custom layout ResId | -2 |
mainActivityThemeId | int | Identity verification Activity theme ResId | -2 |
statusBarColor | int | Status bar color (in 0xFFFFFF format) | -2 |
isTransparentStatusBar | boolean | Whether the status bar is transparent | false |
transparentStatusBarMoveHeight | int | Height of content shift when the status bar is transparent (px) | -2 |
useDeepColorStatusBarIcon | boolean | Whether the status bar icons use dark color | false |
isShowCountdown | boolean | Whether to display the countdown | true |
isShowErrorDialog | boolean | Whether to display error pop-ups | true |
countDownTxtColor | int | Countdown text color | -2 |
cancelTxtColor | int | Cancel button text color | -2 |
feedBackTxtColor | int | Detection feedback prompt text color (normal state) | -2 |
feedBackErrorColor | int | Detection feedback error state color | -2 |
feedBackExtraTipColor | int | Detection feedback additional prompt text color | -2 |
authCircleCorrectColor | int | Face circular frame color when actions are correct | -2 |
authCircleErrorColor | int | Face circular frame color when actions are incorrect | -2 |
isHideFrontCircleViewOnStart | boolean | Whether to hide the face circle during the startup phase | false |
isHideFrontCircleViewOnCheck | boolean | Whether to hide the face circle during the action detection phase | false |
isHideFrontCircleViewOnReflect | boolean | Whether to hide the face circle during the reflection phase | false |
isHideAvatarGuideFrame | boolean | Whether to hide the avatar guidance box | false |
authLayoutBgColor | int | Verification page background color | -2 |
loadingStageBgColor | int | Loading phase background color | -2 |
loadingStageTipsColor | int | Loading phase prompt text color | -2 |
-2 indicates that this field is not set, and the SDK uses the built-in default value.LanguageStyle type | Description |
LanguageStyle.AUTO | Auto |
LanguageStyle.ENGLISH | English |
LanguageStyle.SIMPLIFIED_CHINESE | Simplified Chinese |
LanguageStyle.TRADITIONAL_CHINESE | Traditional Chinese |
LanguageStyle.CUSTOMIZE_LANGUAGE | Custom language, must be used with languageCode. For details, see Android Customization Capabilities |
/*** Result callback class for Card and Liveness Face Comparison*/public interface EkycHyCallBack {/*** Information about the successful recognition result** @param result Result information.*/void onSuccess(EkycHyResult result);/*** Failure details of the Card and Liveness Face Comparison process** @param errorCode Error code.* @param errorMsg Error message.* @param ekycToken token for the current process*/void onFail(int errorCode, String errorMsg, String ekycToken);}
Type | Name | Meaning | Default Value |
String | ekycToken | The token for the current Identity Verification process, which can be used to retrieve key data from the identity verification process on the server. | Null |
Error Code | Corresponding meaning |
12000 | It is voluntarily canceled by user |
12001 | Network request failure |
12002 | Error caused by OCR recognition exception |
12003 | Exception caused by on-device face detection failure |
12004 | Expired token |
12005 | On-device document recognition failure |
12006 | Failure in the initialization process of the Identity Verification SDK |
12007 | Startup parameter validation failure |
12008 | Failure in the return of selfie verification results |
12009 | Failure in the on-device selfie verification process |
Was this page helpful?
You can also Contact sales or Submit a Ticket for help.
Help us improve! Rate your documentation experience in 5 mins.
Feedback