ID Verification - KYC SDK for Android provides the setCustomUIConfig operation, which allows you to configure custom UI configurations, such as UI colors and icons, for SDK for Android by passing a file or a JSON string. KYC is short for Know Your Customer. This topic describes how to call the setCustomTxtConfig operation and provides sample code.
To ensure that the custom UI configurations can take effect, we recommend that you update the SDK to the latest version before you call the operation. If the specified custom UI configurations conflict with the extended parameters of the verification operation, the custom UI configurations take precedence. Make sure that the custom UI configurations take precedence over all parameters of the verification operation to provide a consistent and intuitive user experience.
Overview
ID Verification - KYC SDK for Android provides the setCustomUIConfig operation, which allows you to configure custom UI colors and icons. You can call this operation to configure custom UI configurations by specifying the request parameters.
Usage notes
Parameters
Parameter | Type | Description |
paramType | int | The configuration type. Valid values:
|
param | String | The configuration. You can specify a value based on the value of paramType. |
Return value
The return value. The value is a string. If the SDK encounters an error or exception when the SDK parses the value of param, a message is returned.
If the specified parameters are invalid, check the return value.
Sample code
// Specify the name of an application asset file.
String fileName = "DTFCustomUIConfig.json";
int paramType = IDTFacade.EXT_PARAMS_CONFIG_ASSETS_NAME;
String customUIErrMsg = IdentityPlatform.getInstance().setCustomUIConfig(paramType, fileName);
// Specify a JSON string.
String jsonConfig = "<Custom UI configurations in the JSON format>";
int paramType = IDTFacade.EXT_PARAMS_CONFIG_JSON;
String customUIErrMsg = IdentityPlatform.getInstance().setCustomUIConfig(paramType, jsonConfig);
Custom UI configurations
You can specify custom font colors and specific icons on the verification page. The following section provides a complete configuration example and the descriptions of the parameters.