Customization through API
This section will cover how developers can use VidaUICustomizationOption to control colors, themes, and language preferences in the KYC SDK’s built-in UI.
UI Customization Using API
Use VidaCardUICustomizationOption to control colors, themes, screen visibility, and language preferences in the KYC SDK's built-in UI.
// Create an instance of UI Customization using
//VidaCardUICustomizationOption
VidaCardUICustomizationOption vidaUICustomizationOption =
VidaUICustomizationOption.VidaUICustomizationOptionBuilder.newInstance()
// Set Locale of the application for the specific language
.setLocal(locale)
// Set maximum backend attempts
.setMaxAttempt(3)
.setShowIntroScreen(true) // Enable or disable the Introduction screen
.setShowTutorialScreen(true) // Enable or disable the tutorial screen
.setShowSelectionScreen(true)// Enable or disable the selection screen
.setPassportScanningEnabled(false)// To disable passport based flows
.setCountryCode(countryCode)// Set the country code of the KYC flow
.setTutorialScreenFactory(new MyTutorialUiFactory())
// Sets a custom Tutorial UI implementation
.build();Configurations Options
setLocal(locale)
Set the locale/language of the SDK UI.
setMaxAttempt(int)
Set maximum attempts for backend requests.
setShowIntroScreen(boolean)
Enable or disable Introduction screen.
setShowTutorialScreen(boolean)
Controls whether the Document OCR tutorial screen is displayed to users. This setting does not affect the Liveness tutorial screen, which is currently always shown. Support for disabling the Liveness tutorial independently will be available in a future release.
setShowSelectionScreen(boolean)
Enable or disable selection screen.
setShowReviewScreen(boolean)
Enable or disable review confirmation screen.
setPassportScanningEnabled(boolean)
Enable or disable passport scanning.
setCountryCode(String)
Set the country code of the KYC flow.
Liveness Customization using API
The setLivenessCustomisationOptions method allows developers to configure options specific to the liveness verification flow, such as enabling or disabling the liveness tutorial screen.
Setting the Card Type
Use setCardType(CardType) on the VidaKycRequest object to explicitly set which document type the SDK should capture. This is especially useful when you hide the built-in document selection screen and want to control the document type programmatically.
How to Set the Card Type
Call setCardType() on your VidaKycRequest instance before starting the SDK:
Supported values
CardType supports the following values:
KTP
Indonesian national ID card
Malaysian Cards (MyKAD, MyKAS, MyPR, My_TENTERA)
Malaysian identity card
PASSPORT
Passport
DL
Driver's license
Default Behaviour
If setCardType() is not called, the SDK uses the default document type for the flow:
Indonesia
KTP
Malaysia
MY_KAD
Usage with Hidden Selection Screen
When you hide the built-in selection screen using setShowSelectionScreen(false), you should explicitly call setCardType() to specify which document the SDK should capture. If you hide the selection screen without calling setCardType(), the SDK falls back to the default document type for the region.
Building your own selection screen
To replace the built-in document selection screen with your own:
Disable the built-in screen in the UI customization builder.
Show your own document type picker in your app.
Pass the user's choice to
VidaKycRequest.setCardType()before starting the SDK.
Card Detection Options
Use VidaCardDetectionOption to configure how the SDK detects and captures the document in the camera view.
detectionTimeOut
Camera detection timeout (in milliseconds).
minimumStableFrames
Minimum number of stable frames before capture.
manualCaptureModeAllowed
Enable or disable manual capture mode.
Custom Tutorial Screens
TutorialScreenFactory allows the Host App to replace the default tutorial screen UI with its own custom implementation. This interface is for providing custom views only — it does not control whether individual tutorial screens (Document OCR or Liveness) are shown or hidden.
This interface is intended only for customizing the tutorial screen UI. The Host App can replace the default tutorial screen with its own design and implementation.
getRoot()
Root view of the tutorial screen
getBackButton()
View used to navigate back
getNextButton()
View used to proceed to capture
Localization
The SDK includes built-in support for the following languages:
English (
en) - DefaultIndonesian (
id)
To use a supported language, pass the locale when building the UI customization options:
To add support for additional languages not included in the SDK, provide translated string resources in your app's res/values-<language>/strings.xml for the SDK's string keys.
Customization Using Attributes
You can also customize the SDK's appearance by overriding XML attributes in your app's theme. These attributes control colors, text, font sizes, images, and branding across all SDK screens.
Common Styles
Introduction Screen
Document Selection Screen
Document Capture Screen
Camera Screen
Permission Dialog
Leaving Soon Dialog
Manual Capture Dialog
General Error Screen
IQA Error Screen
Tutorial & Card Images
Last updated
