Introducing VIDA Identity Stack: All of VIDA, in one place 🎉
For the complete documentation index, see llms.txt. This page is also available as Markdown.

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

Option
Description

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:

Type Card
Description

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:

Flow
Default card type

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.

setCardType() is available in KYC Android SDK v1.1.6 and later. If you are on an older version, please upgrade before using this method.

Building your own selection screen

To replace the built-in document selection screen with your own:

  1. Disable the built-in screen in the UI customization builder.

  2. Show your own document type picker in your app.

  3. 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.

Options
Description

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.

Note: TutorialScreenFactory is not used to enable or disable individual tutorial screens. To control the Document OCR tutorial visibility, use setShowTutorialScreen(boolean). Disabling the Liveness tutorial screen independently is not supported in the current Android SDK release but will be available in a future version. This capability is already supported on the iOS SDK.

Method
Description

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) - Default

  • Indonesian (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

XML Attributes

Introduction Screen

XML Attributes

Document Selection Screen

XML Attributes

Document Capture Screen

XML Attributes

Camera Screen

XML Attributes

Permission Dialog

XML Attributes

Leaving Soon Dialog

XML Attributes

Manual Capture Dialog

XML Attributes

General Error Screen

XML Attributes

IQA Error Screen

XML Attributes

Tutorial & Card Images

XML Attributes

Last updated