tencent cloud

eKYC

Release Notes and Announcements
Release Notes
Product Announcements
Product Introduction
Overview
Strengths
Use Cases
Purchase Guide
Billing Overview
Purchase Method
Payment Overdue
Refund
Integration Guide
Getting Started
Selfie Verification (Pure API)
Selfie Verification (Mobile HTML5)
Selfie Verification (App SDK)
Identity Verification (Mobile HTML5)
Identity Verification (App SDK)
Other Guide
API Documentation
History
Introduction
API Category
Making API Requests
Selfie Verification (Pure API) APIs
Selfie Verification (App SDK) APIs
Identity Verification (App SDK) APIs
Identity Verification(Mobile HTML5) APIs
AI Face Shield (Pure API) APIs
Other APIs
Data Types
Error Codes
FAQs
Contact Us
Glossary
eKYC Policy
Privacy Policy
Data Processing And Security Agreement
Service Level Agreement

Android Customization Capabilities

PDF
Focus Mode
Font Size
Last updated: 2026-03-27 11:20:38

Custom prompts and add languages

Custom prompt

If you need to modify prompt texts or add other language files, you can implement it using the following approach. The Identity Verification SDK provides a translation file custom_strings.xml, which contains all configurable text resources exposed by the SDK.

1. Open the main module project (the module integrating the SDK).
2. Add custom_strings.xml to the corresponding language folder.
3. Modify the text content that needs to be customized as needed.
4. After packaging, your modified content will automatically overwrite the pre-existing content.
└── src
└── main
├── AndroidManifest.xml
├── assets
├── java
└── res
├── values-zh-rCN
│ └── custom_strings.xml
└── values-zh-rHK
└── custom_strings.xml

Additional language

When adding a new language file, perform the following three steps to implement it:
1. Add the corresponding language folder in the main module project (the module integrating the Identity Verification SDK).
2. Copy custom_strings.xml to the target language folder and modify the corresponding value content.
└── src
└── main
├── AndroidManifest.xml
├── assets
├── java
└── res
├── values-th-rTH
│ └── custom_strings.xml <<<<<<<<<<< Taking Thai as an example, values-th-rTH
├── values-zh-rCN
│ └── custom_strings.xml
└── values-zh-rHK
└── custom_strings.xml
3. Specify the corresponding language code in the code (using Thai as an example).
EkycHyConfig ekycHyConfig = new EkycHyConfig();
ekycHyConfig.setLanguageStyle(LanguageStyle.CUSTOMIZE_LANGUAGE);
ekycHyConfig.setLanguageCode("th-TH");


Appendix: Android Language Codes

This document provides the following partial language codes for Android for reference.
language code
Corresponding countries or regions of use
af-ZA
Afrikaans - South Africa
sq-AL
Albanian - Albania
ar-DZ
Arabic - Algeria
ar-BH
Arabic - Bahrain
ar-EG
Arabic - Egypt
ar-IQ
Arabic - Iraq
ar-JO
Arabic - Jordan
ar-KW
Arabic - Kuwait
ar-LB
Arabic - Lebanon
ar-LY
Arabic - Libya
ar-MA
Arabic - Morocco
ar-OM
Arabic - Oman
ar-QA
Arabic - Qatar
eu-ES
Basque - Basque
be-BY
Belarusian - Belarus
bg-BG
Bulgarian - Bulgaria
ca-ES
Catalan - Catalonia
zh-HK
Chinese - Hong Kong (China)
zh-MO
Chinese - Macao (China)
zh-CN
Chinese - China
zh-SG
Chinese - Singapore
zh-TW
Chinese - Taiwan (China)
zh-CHS
Chinese (Simplified)
zh-CHT
Chinese (Traditional)
hr-HR
Croatian - Croatia
cs-CZ
Czech - Czech Republic
da-DK
Danish - Denmark
div-MV
Dhivehi - Maldives
nl-BE
Dutch - Belgium
nl-NL
Dutch - Netherlands
en-AU
English - Australia
en-CA
English - Canada
en-ZA
English - South Africa
en-PH
English - Philippines
en-NZ
English - New Zealand
en-GB
English - UK
en-US
English - United States
fa-IR
Persian - Iran
fi-FI
Finnish - Finland
fr-FR
French - France
fr-BE
French - Belgium
fr-MC
French - Monaco
fr-CH
French - Switzerland
gl-ES
Galician - Galicia
ka-GE
Georgia State - Georgia State
de-DE
German - Germany
de-LU
German - Luxembourg
de-CH
German - Switzerland
el-GR
Greek - Greece
gu-IN
Gujarati - India
he-IL
Hebrew - Israel
hi-IN
Hindi - India
hu-HU
Hungarian - Hungary
is-IS
Icelandic - Iceland
it-IT
Italian - Italy
ja-JP
Japanese - Japan
kk-KZ
Kazakh - Kazakhstan
kn-IN
Kannada - India
ko-KR
Korean - South Korea
lv-LV
Latvian - Latvia
lt-LT
Lithuanian - Lithuania
ms-BN
Malay - Brunei
ms-MY
Malay - Malaysia
mr-IN
Marathi - India
mn-MN
Mongolian - Mongolia
nn-NO
Norwegian (Nynorsk) - Norway
pl-PL
Polish - Poland
pt-BR
Portuguese - Brazil
pt-PT
Portuguese - Portugal
ro-RO
Romanian - Romania
sa-IN
Sanskrit - India
ru-RU
Russian - Russia
sk-SK
Slovak - Slovakia
es-AR
Spanish - Argentina
es-ES
Spanish - Spain
sv-SE
Swedish - Sweden
th-TH
Thai - Thailand
tr-TR
Turkish - Türkiye
uk-UA
Ukrainian - Ukraine
ur-PK
Urdu - Pakistan
vi-VN
Vietnamese - Vietnam

Custom layout

The eKYC SDK supports customization of the OCR recognition interface and the selfie verification page layout. By configuring OcrUiConfig and FaceAuthUiConfig in EkycHyConfig, you can achieve complete UI customization.

The SDK provides two default layout files as reference templates in the resources/custom_layout/ directory:
ocr_detect_fragment.xml: Default layout for the OCR recognition page.
huiyan_fragment_authing.xml: Default layout for the selfie verification page.

We recommend modifying based on these two files to ensure the necessary View components and IDs remain consistent.


Custom Layout for the OCR Page

The custom layout for the OCR recognition page is implemented via OcrUiConfig.setPortraitLayoutResId() by passing in the Resource ID of the custom layout:
EkycHyConfig ekycHyConfig = new EkycHyConfig();

OcrUiConfig ocrUiConfig = new OcrUiConfig();
ocrUiConfig.setPortraitLayoutResId(R.layout.custom_ocr_layout);

ekycHyConfig.setOcrUiConfig(ocrUiConfig);
Note:
Custom layouts must retain the necessary View components required by the OCR SDK. Do not modify the type or android:id of these Views. It is recommended to modify using ocr_detect_fragment.xml as a template.


Custom layout for the liveness face verification page

The custom layout for the selfie verification page is implemented via FaceAuthUiConfig.setAuthLayoutResId() by passing in the Resource ID of the custom layout:
EkycHyConfig ekycHyConfig = new EkycHyConfig();

FaceAuthUiConfig faceAuthUiConfig = new FaceAuthUiConfig();
faceAuthUiConfig.setAuthLayoutResId(R.layout.custom_face_auth_layout);
faceAuthUiConfig.setMainActivityThemeId(R.style.CustomFaceAuthTheme);

ekycHyConfig.setFaceAuthUiConfig(faceAuthUiConfig);
Note:
When the selfie verification layout is customized, the type and android:id of all Views must match those required by the selfie verification SDK, as these Views participate in interface event binding. It is recommended to modify using huiyan_fragment_authing.xml as a template.


Event Binding for Custom Layouts

When the layout is customized, you can bind events to newly added UI controls via the setAuthEventCallBack() method. When the main interface for liveness face detection is created, the HuiYanAuthEventCallBack.onMainViewCreate(View) method is called back. At this point, you can obtain controls from the custom layout and register event listeners:
EkycHySdk.setAuthEventCallBack(new HuiYanAuthEventCallBack() {
@Override
public void onMainViewCreate(View authView) {
if (authView == null) {
return;
}
// Obtain controls in the custom layout
Button customButton = authView.findViewById(R.id.custom_button_id);
if (customButton != null) {
customButton.setOnClickListener(v -> {
// Handle custom button click events
Log.d(TAG, "Custom button clicked");
});
}
}

@Overridever
public void onMainViewDestroy() {
// Cleanup upon page destruction
Log.d(TAG, "Auth view destroyed");
}
});

Similarly, for the custom layout of the OCR recognition interface, you can bind events to newly added UI controls via the setOcrEventCallBack() method:
EkycHySdk.setOcrEventCallBack(new OcrEventListener() {
@Override
public void onMainViewCreate(View ocrView) {
if (ocrView == null) {
return;
}
// Obtain controls in the custom OCR layout
Button customOcrButton = ocrView.findViewById(R.id.custom_ocr_button_id);
if (customOcrButton != null) {
customOcrButton.setOnClickListener(v -> {
// Handle custom button click events
Log.d(TAG, "Custom OCR button clicked");
});
}
}

@Override
public void onMainViewDestroy() {
// Cleanup upon page destruction
Log.d(TAG, "OCR view destroyed");
}
});


Help and Support

Was this page helpful?

Help us improve! Rate your documentation experience in 5 mins.

Feedback