UI customization
Android SDK provides various customization options with programming code or xml files.
Getting started
Create IdenfyUISettings
Create an instance of IdenfyUISettings class:
val idenfyUISettingsV2 = IdenfyUISettingsV2.IdenfyUIBuilderV2()
.build()
Update IdenfyUISettings
val idenfySettingsV2 = IdenfySettingsV2.IdenfyBuilderV2()
.withIdenfyUISettingsV2(idenfyUISettingsV2)
...
build()
SDK currently supports three ways of customization:
Customization options
Customization with IdenfyUISettingsV2:
-
Camera OnBoarding view
IdenfyUISettingsV2.IdenfyUIBuilderV2()
/**
* OnBoarding View acts as additional screen, which helps user to familiarize himself with current step
* @param idenfyOnBoardingViewTypeEnum Defines onBoarding view type
*/
.withConfirmationView(idenfyOnBoardingViewTypeEnum: IdenfyOnBoardingViewTypeEnum)
...
build()
The possible options of the Camera OnBoarding View are explained below:
| IdenfyOnBoardingViewTypeEnum | Description | UI |
|---|---|---|
NONE | OnBoarding view is skipped | |
MULTIPLE_STATIC | Shows an onBoarding view before EVERY step of the verification process with a static instruction list | ![]() |
-
Language selection
IdenfyUISettingsV2.IdenfyUIBuilderV2()
/**
* Enables language selection window, which provides an option to change the locale
* @param isLanguageSelectionNeeded Changes visibility of locale selection
icon.
*/
.withLanguageSelection(Boolean isLanguageSelectionNeeded)
...
build()
-
Mismatch tags alert visibility
IdenfyUISettingsV2.IdenfyUIBuilderV2()
/**
* An option to choose whether mismatch tags alert is visible
* @param mismatchTagsAlert: set the visibility of mismatch tags alert
icon.
*/
.withMismatchTagsAlert(Boolean mismatchTagsAlert)
...
build()
-
Document camera rectangle visibility
Since some documents are non regular size, therefore we have an option to hide the camera rectangle. This way the whole screen is dedicated to the document capturing.
The rectangle can be hidden for all document types:
/**
* Camera rectangle will be hidden for ALL countries and document types
*/
val idenfyUISettingsV2 =
IdenfyUISettingsV2.IdenfyUIBuilderV2()
.withDocumentFrameVisibility(DocumentCameraFrameVisibility.HiddenForAllCountriesAndDocumentTypes)
.build()
or for specific countries and document types:
/**
* Camera rectangle will be hidden ONLY for Lithuanian passport
*/
val countryDocumentMap: MutableMap<String, List<DocumentTypeEnum>> = mutableMapOf()
countryDocumentMap["LT"] = mutableListOf(DocumentTypeEnum.PASSPORT)
val documentCameraFrameVisibility = DocumentCameraFrameVisibility.HiddenForSpecificCountriesAndDocumentTypes(countryDocumentMap)
val idenfyUISettingsV2 = IdenfyUISettingsV2.IdenfyUIBuilderV2()
.withDocumentFrameVisibility(documentCameraFrameVisibility)
.build()
-
Adding instructions in camera session.
The iDenfySDK provides informative instructions during the verification session. They can provide valuable information for the user and help to tackle common issues: bad lightning, wrong document side, etc. Instructions can be customized, by changing all UI elements or even using your MP4 video files. Instructions are configured by your backend settings and can be overridden with the SDK settings.
Using IdenfyInstructionsEnum dialog
Using IdenfyInstructionsEnum none
1. Enable instructions in IdenfyUISettingsV2
val idenfyUISettingsV2 = IdenfyUISettingsV2.IdenfyUIBuilderV2()
.withInstructions(IdenfyInstructionsType.DIALOG)
...
build()
