ID Verification Android SDK は、ユーザーインターフェース (UI) の色とアイコンをカスタマイズするための setCustomUIConfig インターフェイスを提供します。カスタム UI 構成をファイルまたは JSON データ形式で作成し、setCustomUIConfig インターフェイスに渡すことで、カスタム UI 効果を適用できます。このトピックでは、UI カスタマイズインターフェイスについて説明し、コード例を示します。
一部のカスタム構成では、SDK のアップグレードが必要になる場合があります。これらの構成を使用する前に、SDK を最新バージョンにアップグレードしてください。カスタムユーザーインターフェイス設定が検証インターフェイスの拡張パラメーターと競合する場合、ユーザーインターフェイス設定が優先されます。これにより、一貫性のある直感的なユーザーエクスペリエンスが保証されます。
インターフェイスの説明
インターフェイス定義
Android SDK は、UI の色とアイコンをカスタマイズするための setCustomUIConfig インターフェイスを提供します。このメソッドを呼び出し、必要なパラメーターを渡すことで、カスタム UI 効果を適用します。
/**
* カスタム UI の色とアイコンを設定します。
*
* @return 構成ファイルで検出された例外情報。
* @description このインターフェイスは、カスタム UI を設定するために使用されます。
* @paramType paramType パラメータータイプ {@link IDTFacade}。有効な値:
* {@link IDTFacade.EXT_PARAMS_CONFIG_JSON} | {@link IDTFacade.EXT_PARAMS_CONFIG_ASSETS_NAME})。
*
* @params {@link String} params paramType に対応するパラメーター値。
*/
public String setCustomUIConfig(@IDTFacade int paramType, String param) {
// ...
}リクエストパラメーター
名前 | タイプ | 説明 |
paramType | int | カスタム入力パラメーターのタイプ。有効な値:
|
param | String | paramType の値に基づいて渡されるデータ。 |
戻り値
文字列が返されます。SDK が param パラメーターのコンテンツを解析する際にエラーまたは例外が発生した場合、メッセージが返されます。構成パラメーターが無効な場合は、戻り値で詳細情報を確認できます。
コード例
// アセットファイル名を渡します。
String fileName = "DTFCustomUIConfig.json";
int paramType = IDTFacade.EXT_PARAMS_CONFIG_ASSETS_NAME;
String customUIErrMsg = IdentityPlatform.getInstance().setCustomUIConfig(paramType, fileName);
// JSON 文字列を渡します。
String jsonConfig = "<JSON 形式のカスタム UI 構成>";
int paramType = IDTFacade.EXT_PARAMS_CONFIG_JSON;
String customUIErrMsg = IdentityPlatform.getInstance().setCustomUIConfig(paramType, jsonConfig);カスタム UI 構成
認証ページのフォントの色と一部のアイコンをカスタマイズできます。
完全な構成例
{
"faceConfig": {
"faceBGColor": "#A8D8B4",
"exitIconBase64": "exit_icon_base64",
"faceTitleColor": "#3E5E7E",
"faceTipColor": "#F0E68C",
"interruptedAlertTitleColor": "#FF6347",
"interruptedAlertMessageColor": "#4682B4",
"interruptedAlertConfirmColor": "#DDA0DD",
"permissionFailedAlertTitleColor": "#6A5ACD",
"permissionFailedAlertMessageColor": "#8A2BE2",
"permissionFailedAlertConfirmColor": "#5F9EA0",
"tooManyRetriesAlertTitleColor": "#DC143C",
"tooManyRetriesAlertMessageColor": "#00FFFF",
"tooManyRetriesAlertConfirmColor": "#B8860B",
"faceProgressStartColor": "#006400",
"faceProgressEndColor": "#BDB76B",
"exitAlertTitleColor": "#8B008B",
"exitAlertMessageColor": "#556B2F",
"exitAlertCancelColor": "#FF8C00",
"exitAlertConfirmationColor": "#9932CC",
"timeoutAlertTitleColor": "#E9967A",
"timeoutAlertMessageColor": "#8FBC8F",
"timeoutAlertConfirmationColor": "#483D8B",
"verifyLoadingColor": "#2F4F4F",
"verifyNetworkErrorAlertTitleColor": "#00CED1",
"verifyNetworkErrorAlertMessageColor": "#9400D3",
"verifyNetworkErrorAlertCancelColor": "#FF1493",
"verifyNetworkErrorAlertConfirmColor": "#00BFFF"
},
"ocrConfig": {
"exitIconBase64": "exit_icon_base64",
"ocrTitleColor": "#696969",
"ocrBorderColor": "#1E90FF",
"albumBase64": "album_base64",
"takePhotoBase64": "take_photo_base64",
"submitBase64": "submit_base64",
"ocrSubmitTitleColor": "#B22222",
"ocrLoadingColor": "#FFFAF0",
"failedAlertTitleColor": "#228B22",
"failedAlertMessageColor": "#FF00FF",
"failedAlertCancelColor": "#DCDCDC",
"failedAlertConfirmationColor": "#F8F8FF",
"ocrNetworkErrorAlertTitleColor": "#FFD700",
"ocrNetworkErrorAlertMessageColor": "#DAA520",
"ocrNetworkErrorAlertCancelColor": "#808080",
"ocrNetworkErrorAlertConfirmColor": "#008000",
"permissionFailedAlertTitleColor": "#ADFF2F",
"permissionFailedAlertMessageColor": "#F0FFF0",
"permissionFailedAlertConfirmColor": "#FF69B4",
"docErrorAlertTitleColor": "#CD5C5C",
"docErrorAlertMessageColor": "#4B0082",
"docErrorAlertCancelColor": "#FFFFF0",
"docErrorAlertConfirmColor": "#F0E68C",
"restrictionsAlertTitleColor": "#E6E6FA",
"restrictionsAlertMessageColor": "#FFF0F5",
"restrictionsAlertConfirmationColor": "#7CFC00",
"timeoutAlertTitleColor": "#FFFACD",
"timeoutAlertMessageColor": "#ADD8E6",
"timeoutAlertConfirmationColor": "#F08080",
"exitAlertTitleColor": "#E0FFFF",
"exitAlertCancelColor": "#FAFAD2",
"exitAlertConfirmationColor": "#D3D3D3",
"ocrMessageFailAlertTitleColor": "#90EE90",
"ocrMessageFailAlertCancelColor": "#FFB6C1",
"ocrMessageFailAlertConfirmColor": "#FFA07A",
"ocrResultExitIconBase64": "ocr_result_exit_icon_base64",
"ocrResultTitleColor": "#20B2AA",
"ocrResultTipBGColor": "#87CEFA",
"ocrResultTipColor": "#778899",
"ocrResultInfoTitleColor": "#B0C4DE",
"ocrResultInfoContentColor": "#FFFFE0",
"ocrResultConfirmBtnEnabledBGColor": "#00FF00",
"ocrResultConfirmBtnEnabledTitleColor": "#32CD32",
"ocrResultTipTitleColor": "#FAF0E6",
"ocrResultTipIconBase64": "ocr_result_tip_icon_base64",
"ocrResultErrorTipBGColor": "#FF00FF",
"ocrResultInfoBorderColor": "#800000",
"ocrResultConfirmBtnDisabledBGColor": "#66CDAA",
"ocrResultConfirmBtnDisabledTitleColor": "#0000CD",
"ocrResultExitAlertTitleColor": "#BA55D3",
"ocrResultExitAlertCancelColor": "#9370DB",
"ocrResultExitAlertConfirmationColor": "#3CB371",
"ocrResultInfoEmptyAlertTitleColor": "#7B68EE",
"ocrResultInfoEmptyAlertConfirmColor": "#00FA9A",
"ocrResultNetworkErrorAlertTitleColor": "#48D1CC",
"ocrResultNetworkErrorAlertMessageColor": "#C71585",
"ocrResultNetworkErrorAlertConfirmColor": "#191970",
"ocrResultNetworkErrorAlertCancelColor": "#F5FFFA",
"ocrResultInfoErrorAlertMessageColor": "#FFE4E1",
"ocrResultInfoErrorAlertConfirmColor": "#FFE4B5",
"unFloodLightBase64": "un_flood_light_base64",
"floodLightBase64": "flood_light_base64",
"autoScanBase64": "auto_scan_base64",
"takeShootBase64": "take_shoot_base64",
"ocrTakePhotoLabelColor": "#FFDEAD",
"ocrAlbumLabelColor": "#000080",
"ocrGuideExitIconBase64": "ocr_guide_exit_icon_base64",
"ocrGuideTitleColor": "#FDF5E6",
"ocrGuideContentColor": "#808000",
"ocrGuideStartBtnBGColor": "#6B8E23",
"ocrGuideStartBtnTextColor": "#FFA500",
"ocrGuideIndicatorSelectedColor": "#FF4500",
"ocrGuideIndicatorUnSelectedColor": "#DA70D6",
"nfcInputExitIconBase64": "nfc_input_exit_icon_base64",
"nfcInputTitleColor": "#EEE8AA",
"nfcInputPassportLabelColor": "#98FB98",
"nfcInputBirthdayLabelColor": "#AFEEEE",
"nfcInputValidityLabelColor": "#DB7093",
"nfcInputPassportEditColor": "#FFEFD5",
"nfcInputBirthdayEditColor": "#FFDAB9",
"nfcInputValidityEditColor": "#CD853F",
"nfcInputPassportEditHintColor": "#FFC0CB",
"nfcInputBirthdayEditHintColor": "#DDA0DD",
"nfcInputValidityEditHintColor": "#B0E0E6",
"nfcInputNextBtnBGSelectColor": "#800080",
"nfcInputNextBtnTextSelectColor": "#663399",
"nfcInputNextBtnBGUnSelectColor": "#FF0000",
"nfcInputNextBtnTextUnSelectColor": "#BC8F8F",
"nfcInputBackAlertTitleColor": "#4169E1",
"nfcInputBackAlertCancelColor": "#8B4513",
"nfcInputBackAlertConfirmColor": "#FA8072",
"nfcInputCheckAlertTitleColor": "#F4A460",
"nfcInputCheckAlertMessageColor": "#2E8B57",
"nfcInputCheckAlertConfirmColor": "#A0522D",
"nfcExitIconBase64": "nfc_exit_icon_base64",
"nfcTitleColor": "#C0C0C0",
"nfcContentColor": "#87CEEB",
"nfcConfirmBtnBGColor": "#6A5ACD",
"nfcConfirmBtnTextColor": "#708090",
"nfcReadBackAlertTitleColor": "#00FF7F",
"nfcReadBackAlertConfirmColor": "#4682B4",
"nfcReadBackAlertCancelColor": "#D2B48C",
"nfcSettingAlertTitleColor": "#D2691E",
"nfcSettingAlertMessageColor": "#9ACD32",
"nfcSettingAlertConfirmColor": "#FF7F50",
"nfcSettingAlertCancelColor": "#6495ED",
"nfcReadStatusExitBase64": "nfc_read_status_exit_base64",
"nfcReadStatusTextColor": "#DC143C"
}
}フィールド構成の効果
faceModule
faceBGColor
| exitIconBase64
| faceTitleColor
|
faceTipColor
| interruptedAlertTitleColor
| interruptedAlertMessageColor
|
interruptedAlertConfirmColor
| permissionFailedAlertTitleColor
| permissionFailedAlertMessageColor
|
permissionFailedAlertConfirmColor
| tooManyRetriesAlertTitleColor
| tooManyRetriesAlertMessageColor
|
tooManyRetriesAlertConfirmColor
| faceProgressStartColor
| faceProgressEndColor
|
exitAlertTitleColor
| exitAlertMessageColor
| exitAlertCancelColor
|
exitAlertConfirmationColor
| timeoutAlertTitleColor
| timeoutAlertMessageColor
|
timeoutAlertConfirmationColor
| verifyLoadingColor
| verifyNetworkErrorAlertTitleColor
|
verifyNetworkErrorAlertMessageColor
| verifyNetworkErrorAlertCancelColor
| verifyNetworkErrorAlertConfirmColor
|
ocrModule
exitIconBase64
| ocrTitleColor
| ocrBorderColor
|
albumBase64 | takePhotoBase64
| submitBase64
|
ocrSubmitTitleColor
| ocrLoadingColor
| failedAlertTitleColor
|
failedAlertMessageColor
| failedAlertCancelColor
| failedAlertConfirmationColor
|
ocrNetworkErrorAlertTitleColor
| ocrNetworkErrorAlertMessageColor
| ocrNetworkErrorAlertCancelColor
|
ocrNetworkErrorAlertConfirmColor
| permissionFailedAlertTitleColor
| permissionFailedAlertMessageColor
|
permissionFailedAlertConfirmColor
| docErrorAlertTitleColor
| docErrorAlertMessageColor
|
docErrorAlertCancelColor
| docErrorAlertConfirmColor
| restrictionsAlertTitleColor
|
restrictionsAlertMessageColor
| restrictionsAlertConfirmationColor
| timeoutAlertTitleColor
|
timeoutAlertMessageColor
| timeoutAlertConfirmationColor
| exitAlertTitleColor
|
exitAlertCancelColor
| exitAlertConfirmationColor
| ocrMessageFailAlertTitleColor
|
ocrMessageFailAlertCancelColor
| ocrMessageFailAlertConfirmColor
| ocrResultExitIconBase64
|
ocrResultTitleColor
| ocrResultTipBGColor
| ocrResultTipColor
|
ocrResultInfoTitleColor
| ocrResultInfoContentColor
| ocrResultConfirmBtnEnabledBGColor
|
ocrResultConfirmBtnEnabledTitleColor
| ocrResultTipTitleColor
| ocrResultTipIconBase64
|
ocrResultErrorTipBGColor
| ocrResultInfoBorderColor
| ocrResultConfirmBtnDisabledBGColor
|
ocrResultConfirmBtnDisabledTitleColor
| ocrResultExitAlertTitleColor
| ocrResultExitAlertCancelColor
|
ocrResultExitAlertConfirmationColor
| ocrResultInfoEmptyAlertTitleColor
| ocrResultInfoEmptyAlertConfirmColor
|
ocrResultNetworkErrorAlertTitleColor
| ocrResultNetworkErrorAlertMessageColor
| ocrResultNetworkErrorAlertConfirmColor
|
ocrResultNetworkErrorAlertCancelColor
| ocrResultInfoErrorAlertMessageColor
| ocrResultInfoErrorAlertConfirmColor
|
unFloodLightBase64
| floodLightBase64
| autoScanBase64
|
takeShootBase64
| ocrTakePhotoLabelColor
| ocrAlbumLabelColor
|
ocrGuideExitIconBase64
| ocrGuideTitleColor
| ocrGuideContentColor |
ocrGuideStartBtnBGColor
| ocrGuideStartBtnTextColor
| ocrGuideIndicatorSelectedColor
|
ocrGuideIndicatorUnSelectedColor
| nfcInputExitIconBase64
| nfcInputTitleColor
|
nfcInputPassportLabelColor
| nfcInputBirthdayLabelColor
| nfcInputValidityLabelColor
|
nfcInputPassportEditColor
| nfcInputBirthdayEditColor
| nfcInputValidityEditColor
|
nfcInputPassportEditHintColor
| nfcInputBirthdayEditHintColor
| nfcInputValidityEditHintColor
|
nfcInputNextBtnBGSelectColor
| nfcInputNextBtnTextSelectColor
| nfcInputNextBtnBGUnSelectColor
|
nfcInputNextBtnTextUnSelectColor
| nfcInputBackAlertTitleColor
| nfcInputBackAlertCancelColor
|
nfcInputBackAlertConfirmColor
| nfcInputCheckAlertTitleColor
| nfcInputCheckAlertMessageColor
|
nfcInputCheckAlertConfirmColor
| nfcExitIconBase64
| nfcTitleColor
|
nfcContentColor
| nfcConfirmBtnBGColor
| nfcConfirmBtnTextColor
|
nfcReadBackAlertTitleColor
| nfcReadBackAlertConfirmColor
| nfcReadBackAlertCancelColor
|
nfcSettingAlertTitleColor
| nfcSettingAlertMessageColor
| nfcSettingAlertConfirmColor
|
nfcSettingAlertCancelColor
| nfcReadStatusExitBase64
| nfcReadStatusTextColor
|





































































































































