Skip to main content
Version: 1.6.15

Teydex Android Document

This document contains all the necessary steps, usage examples, and platform-specific technical details for securely and smoothly integrating the Teydex library into the Android platform.

Version Requirements

To use the Teydex Android library smoothly, you need to check your versions.

PlatformMin version
AndroidminSdkVersion: 24
compileSdkVersion: 34
targetSdkVersion: 34
kotlinVersion: 1.8.0

Android Gradle Configuration

You need to add the following configuration along with the GitLab token in the repository definitions under Settings.gradle. Ensure that you enter the necessary credentials for repository access correctly.

{
maven {
isAllowInsecureProtocol = true
name = "GitLab"
url = uri("<REPO_URL>")
credentials(HttpHeaderCredentials::class) {
name = "Private-Token"
value = "GITLAB_TOKEN"
}
authentication {
create<HttpHeaderAuthentication>("header")
}
}
  • REPO_URL should be replaced with the URL provided to you.
  • Replace the PRIVATE_TOKEN field with the personal access token provided by your organization.
  • The allowInsecureProtocol = true setting should only be used in secure networks or on internal private servers.

Gradle Configuration

Add the following lines to your android/app/build.gradle file:

implementation("com.innovance:kyc:v1.6.15")
note

The SDK is published as several artifact variants, differing along two dimensions:

  • Video call: builds that include the video call components and builds that do not. The artifact name of the including builds is provided to you by the Innovance integration team.
  • Screen recording: builds that support screen recording in the Liveness step (FACE screen recording) and -no-record builds that do not ship that support at all. For example, a core integration that does not need screen recording uses implementation("com.innovance:kyc-no-record:v1.6.15").

All variants carry the same SDK version number. Add only one artifact to your project.

caution

Screen recording support is determined at build time by the artifact you choose; the backend's save_face_match_video flag is evaluated at runtime and cannot remove permissions from an already built APK/AAB. If the backend returns that flag as true while a -no-record artifact is in use, the Liveness step fails with ScreenRecordingError.SCREEN_RECORDING_NOT_AVAILABLE before any camera or permission requests; the SDK does not silently skip the backend's requirement. For this reason the flag must stay false for integrations using a -no-record artifact.

Identity, NFC, selfie and the separate spoken VideoRecord step remain available in -no-record variants; the camera and microphone permissions those steps need are retained.

The following dependencies must be defined at the minimum specified versions in your project's android/build.gradle file. Using lower versions may result in compilation or runtime errors related to the library.

buildscript {
dependencies {
classpath("com.android.tools.build:gradle:7.4.2") // Minimum supported version: 7.4.2
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.8.0" // Minimum supported version: 1.8.0
}
}

Info Screen

The Info screen in your KYC application refers to the informational pages displayed before the steps. Optionally, the following parameters can be added for each step.

Info Screen Features

ParameterTypeDescription
toolbarTitleStringSpecifies the text for the toolbar.
titleTextStringSpecifies the text for the title.
descriptionTextStringSpecifies the text for the description.
buttonTextStringSpecifies the text for the button that starts the step.
imageResId@RawRes IntSpecifies the image to be used.
lottieResId@RawRes IntSpecifies the Lottie animation.
bulletsList<String>Information about the next step can be presented in bullet points.
bulletIcon@RawRes IntSpecifies the icon for the bullet points.

Info Screen Usage

Below is an example of how to use the Info screen.


val frontInfo = buildInfo {
toolbarTitle("Kimlik Ön Yüz")
descriptionText("Lütfen aşağıdaki adımları dikkatlice takip ediniz:")
buttonText("Devam")
lottieResId(R.raw.front)
bullets(
listOf(
"Kimliğinizi Yerleştirin\n" +
"Kimliğinizin arka yüzünü, telefon ekranına paralel bir şekilde
tutun. Kimlik, ekranda görünen şablonun içine tam olarak yerleşecek
şekilde konumlandırılmalıdır.",
"Kimlik Bilgilerinin Görünürlüğü\n Kimlik üzerindeki tüm
bilgilerin net bir şekilde göründüğünden emin olun. Kimlik bilgileri
bulanık olmamalı ve kolayca okunabilir olmalıdır")
)
}

Step

The features to be used in all steps are specified in this section. These features are available in every step (Front, Back, Hologram, NFC, Liveness, Passport, VideoCall, Selfie, VideoRecord, Kps, RuPassportAddressValidation).

Step Features

ParameterTypeDescription
addInfoInfoUsed to add an Info screen to the corresponding step. It is optional.
toolbarTitleStringRepresents the text for the Toolbar to be displayed in the corresponding step.
toolbarRightCloseIconStringRepresents the exit icon to terminate the corresponding step.
toolbarLeftCloseIconStringRepresents the exit icon to terminate the corresponding step.
identifyTimeoutLongSpecifies the timeout duration for the corresponding step (ms). e.g., 10_000
stepInformationTextToSpeechStringSpecifies the voice guidance message.

Glare Detection

Starting with v1.1.0, Front, Back, Liveness, and Passport steps support glare detection to help users capture the document under suitable lighting conditions. When the environment is too bright, too dark, or when a glare is detected on the document, a warning message is displayed to the user on the related screen.

The following parameters are available on Front, Back, and Passport steps:

ParameterTypeDescription
isGlareDetectionEnableBooleanEnables glare detection for the corresponding step. Default is true for Front and Back, and false for Passport.
glareDetectedTextStringWarning text shown when a glare is detected on the document.
tooBrightTextStringWarning text shown when the environment is too bright.
tooDarkTextStringWarning text shown when the environment is too dark.
multipleDocumentsDetectedTextStringWarning text shown when multiple documents are detected in the camera frame.

For the Liveness step, only ambient-light-related parameters are available:

ParameterTypeDescription
isGlareDetectionEnableBooleanEnables ambient light monitoring in the Liveness step. Default is true.
tooBrightTextStringWarning text shown when the environment is too bright.
tooDarkTextStringWarning text shown when the environment is too dark.
note

If any of these parameters is not provided, the SDK falls back to the built-in default warning texts (Turkish).

Front / Back Step Additional Features

In the Front and Back steps, the following parameter is available in addition to the common Step features and the Glare Detection parameters:

ParameterTypeDescription
enableHighestResolutionBooleanMakes document capture use the highest camera resolution the device supports. Default false. Enabling it improves image quality, but capture and upload may take longer.

Front Step Usage

      val front = buildFront {
identifyTimeout(30_000L)
addInfo(frontInfo)
toolbarTitle("Kimlik Ön Yüz")
toolbarRightCloseIcon(R.drawable.ic_close)
isGlareDetectionEnable(true)
glareDetectedText("Glare detected. Please hold the document at a different angle.")
tooBrightText("The environment is too bright. Please reduce the light.")
tooDarkText("The environment is too dark. Please move to a brighter area.")
multipleDocumentsDetectedText("Please show only one document.")
}

Back Step Usage

      val back = buildBack {
identifyTimeout(30_000L)
addInfo(backInfo)
toolbarTitle("Kimlik Arka Yüz")
toolbarRightCloseIcon(R.drawable.ic_close)
isGlareDetectionEnable(true)
glareDetectedText("Glare detected. Please hold the document at a different angle.")
tooBrightText("The environment is too bright. Please reduce the light.")
tooDarkText("The environment is too dark. Please move to a brighter area.")
multipleDocumentsDetectedText("Please show only one document.")
}

NFC Step Features

In addition to the common Step features, the texts on the NFC screen can be customized per step. When a field is not provided, the SDK falls back to its own localized text.

ParameterTypeDescription
scanTitleStringTitle shown while prompting the user to hold their ID near the phone.
scanDescriptionStringInstruction text shown on the same screen.
cancelButtonTextStringText of the cancel button on the reading screen.
retryTitleStringTitle shown when reading fails.
retryDescriptionStringDescription shown when reading fails.
disabledTitleStringTitle shown when NFC is turned off on the device.
disabledDescriptionStringDescription shown when NFC is turned off on the device.
disabledButtonTextStringText of the button shown when NFC is turned off on the device.

NFC Step Usage

     val nfc = buildNFC {
addInfo(nfcInfo)
toolbarRightCloseIcon(R.drawable.ic_close)
toolbarTitle("NFC")
scanTitle("Scan your ID")
scanDescription("Place your ID against the back of your phone and hold it still.")
cancelButtonText("Cancel")
retryTitle("The ID could not be read")
retryDescription("Please hold your ID close to the back of the phone again.")
disabledTitle("NFC is off")
disabledDescription("Turn on NFC on your device to continue.")
disabledButtonText("Open settings")
}

Hologram Step Usage

     val hologram = buildHologram {
addInfo(hologramInfo)
toolbarTitle("Hologram")
}

Passport Step Features

In addition to the common Step features and the Glare Detection parameters:

ParameterTypeDescription
nationalityPassportNationalitySpecifies the nationality of the passport to read. Accepted values: PassportNationality.TR, PassportNationality.RU.

Passport Step Usage

     val passport = buildPassport {
identifyTimeout(60_000L)
addInfo(passportInfo)
nationality(PassportNationality.TR)
toolbarTitle("Passport")
toolbarRightCloseIcon(R.drawable.ic_close)
}

VideoCall Step Features

ParameterTypeDescription
splashScreenResourceId@DrawableRes IntUsed to define the splash screen displayed before VideoCall starts.
caution

Starting with v1.1.0, it is recommended to configure the VideoCall splash screen and external logo image via UIConfig. See the UIConfig section below.

VideoCall Step Usage

     val videoCall = buildVideoCall {
addInfo(videoCallInfo)
splashScreenResourceId(R.drawable.bg_splash)
}

Liveness Step Features

ParameterTypeDescription
rightTextStringThe command telling the user to look right for the liveness photo.
leftTextStringThe command telling the user to look left for the liveness photo.
upTextStringThe command telling the user to look up for the liveness photo.
downTextStringThe command telling the user to look down for the liveness photo.
centerYourFaceTextStringThe command telling the user to look directly (straight) at the camera for the liveness photo.
multipleFaceTextStringThe message informing the user when multiple faces are detected during the liveness step.
dotColor@ColorInt IntThe color of the dots indicating a completed command during the liveness step.
dotRadiusIntThe size (radius) of the dots indicating a completed command during the liveness step.
rightTextToSpeechStringThe voice command telling the user to look right for the liveness photo.
leftTextToSpeechStringThe voice command telling the user to look left for the liveness photo.
upTextToSpeechStringThe voice command telling the user to look up for the liveness photo.
downTextToSpeechStringThe voice command telling the user to look down for the liveness photo.
centerTextToSpeechStringThe voice command telling the user to look directly (straight) at the camera for the liveness photo.

Liveness Step Usage

    val liveness = buildLiveness {
dotColor(Color.Green.toArgb())
rightText("yüzünüzü sağa çeviriniz")
leftText("sola çeviriniz")
upText("yüzünüzü yukarı kaldırınız")
downText("aşağı yöne bakınız")
multipleFaceText("birden fazla yüz algılandı")
identifyTimeout(60_000)
addInfo(livenessInfo)
toolbarTitle("Liveness")
isGlareDetectionEnable(true)
tooBrightText("The environment is too bright. Please reduce the light.")
tooDarkText("The environment is too dark. Please move to a brighter area.")
}

Selfie Step Features

Added in v1.6.0. A step where the user verifies themselves by taking a selfie photo.

ParameterTypeDescription
identifyTimeoutLongTimeout for the step (ms). (Default: 30_000)
centerYourFaceTextStringText telling the user to center their face in the frame.
tooCloseTextStringWarning text shown when the face is too close to the camera.
tooFarTextStringWarning text shown when the face is too far from the camera.
captureButtonTextStringLabel of the capture button.
retakeButtonTextStringLabel of the retake button.
confirmButtonTextStringLabel of the button confirming the captured photo.

Selfie Step Usage

    val selfie = buildSelfie {
identifyTimeout(15_000L)
centerYourFaceText("Center your face in the frame")
tooCloseText("Move your face away")
tooFarText("Move your face closer")
captureButtonText("Take Photo")
retakeButtonText("Retake")
confirmButtonText("Confirm")
addInfo(selfieInfo)
toolbarTitle("Selfie")
toolbarRightCloseIcon(R.drawable.ic_close)
stepInformationTextToSpeech("Center your face in the frame and press the capture button.")
}

VideoRecord Step Features

Added in v1.6.0. A spoken video verification step where the user creates a video recording by reading the text shown on the screen aloud.

note

The text the user must read aloud during the VideoRecord step (prompt_text) is provided to the SDK by the backend. The text is sent to the backend in the transaction init request inside the options object via the video_record_prompt_text and video_record_prompt_mandatory_texts fields; the backend returns it to the SDK during the video step and scores the reading accuracy against these texts.

ParameterTypeDescription
identifyTimeoutLongTimeout for the step (ms). (Default: 60_000)
faceCenterTimeoutMsLongTimeout for centering the face before recording (ms). (Default: 15_000)
readyCountdownMsLongCountdown shown before the recording starts (ms). (Default: 3_000)
recordingDurationMsLongMaximum video recording duration (ms). (Default: 20_000)
videoQualityVideoRecordQualityRecording quality: LOW, MEDIUM, HIGH. (Default: MEDIUM)
centerYourFaceTextStringText telling the user to center their face in the frame.
tooCloseTextStringWarning text shown when the face is too close to the camera.
tooFarTextStringWarning text shown when the face is too far from the camera.
moveLeftTextStringText telling the user to move their face to the left.
moveRightTextStringText telling the user to move their face to the right.
moveUpTextStringText telling the user to move their face up.
moveDownTextStringText telling the user to move their face down.
lookStraightTextStringText telling the user to look straight at the camera.
headTiltedTextStringWarning text shown when the user's head is tilted.
startButtonTextStringLabel of the start-recording button.
stopButtonTextStringLabel of the stop-recording button.
retakeButtonTextStringLabel of the re-record button.
confirmButtonTextStringLabel of the button confirming and submitting the recording.
readingInstructionTextStringInstruction text stating that the prompt must be read aloud during the recording.

VideoRecord Step Usage

    val videoRecord = buildVideoRecord {
identifyTimeout(60_000L)
faceCenterTimeoutMs(15_000L)
readyCountdownMs(3_000L)
recordingDurationMs(20_000L)
videoQuality(VideoRecordQuality.MEDIUM)
centerYourFaceText("Center your face in the frame")
tooCloseText("Move your face away")
tooFarText("Move your face closer")
moveLeftText("Move your face to the left")
moveRightText("Move your face to the right")
moveUpText("Move your face up")
moveDownText("Move your face down")
lookStraightText("Look straight at the camera")
headTiltedText("Straighten your head")
startButtonText("Start Recording")
stopButtonText("Stop Recording")
retakeButtonText("Record Again")
confirmButtonText("Confirm and Submit")
readingInstructionText("Read the text shown on the screen aloud")
addInfo(videoRecordInfo)
toolbarTitle("Spoken Video Verification")
toolbarRightCloseIcon(R.drawable.ic_close)
stepInformationTextToSpeech("Create a video recording by reading the text shown on the screen aloud.")
}

KPS Step Features

Added in v1.6.11. The step where the user's identity information is automatically verified through KPS (Identity Sharing System). It has no properties of its own — it only uses the Step Features common to all steps (addInfo, toolbarTitle, toolbarRightCloseIcon, toolbarLeftCloseIcon, identifyTimeout, stepInformationTextToSpeech).

KPS Step Usage

    val kps = buildKps {
addInfo(kpsInfo)
toolbarTitle("Identity Verification")
toolbarRightCloseIcon(R.drawable.ic_close)
stepInformationTextToSpeech("Your identity information is being verified through KPS.")
}

RuPassportAddressValidation Step Features

The step in which the address page of a Russian passport is photographed and verified. In addition to the common Step features, the following texts can be customized:

ParameterTypeDescription
confirmButtonTextStringText of the button that approves the captured photo.
retakeButtonTextStringText of the button that retakes the photo.
retryTitleStringTitle shown when verification fails.
retryDescriptionStringDescription shown when verification fails.
errorTitleStringTitle shown on error.
maxRetryTitleStringTitle shown when the maximum retry count is exceeded.
maxRetryDescriptionStringDescription shown when the maximum retry count is exceeded.

RuPassportAddressValidation Step Usage

    val ruAddress = buildRuPassportAddressValidation {
addInfo(ruAddressInfo)
toolbarTitle("Address Verification")
toolbarRightCloseIcon(R.drawable.ic_close)
confirmButtonText("Approve")
retakeButtonText("Retake")
retryTitle("The address could not be verified")
retryDescription("Please photograph the address page again.")
maxRetryTitle("No attempts left")
maxRetryDescription("Please try again later.")
}

UIConfig

Used to define the general design features to be used in the application. As of v1.4.5, UIConfig has a modular structure that configures color, typography, and shape settings under separate sub-blocks (colors, typography, shapes). Any setter that is omitted falls back to the SDK's default, so the configuration is purely additive. As of v1.6.0, the full color and shape setter surface is exposed. As of v1.6.11, isDarkTheme and darkColors support was added, letting the SDK switch to a dark theme based on the state reported by the host app.

colors

ParameterTypeDescription
primaryColor@ColorInt IntPrimary brand color (MaterialTheme.colorScheme.primary, outline button border).
onPrimaryColor@ColorInt IntContent color rendered on top of primaryColor.
surfaceColor@ColorInt IntSurface color (bottom sheets, cards).
onSurfaceColor@ColorInt IntContent color rendered on top of surfaceColor.
backgroundColor@ColorInt IntWindow background color.
errorColor@ColorInt IntError accent color.
successColor@ColorInt IntSuccess accent color.
textPrimaryColor@ColorInt IntPrimary text color.
textSecondaryColor@ColorInt IntSecondary text color.
overlayColor@ColorInt IntCamera overlay color — the semi-transparent area outside the document/face frame.
buttonColor@ColorInt IntBackground fill color of buttons. (Default: 0xFF1643E4)
buttonTextColor@ColorInt IntText/content color of buttons. (Default: white)
lineButtonTextColor@ColorInt IntText color of outlined (line) buttons. (Default: black)
bulletTextColor@ColorInt IntText color of bullet points on info screens. (Default: 0xFF808080)
titleColor@ColorInt IntTitle text color on info screens.
descriptionColor@ColorInt IntDescription text color on info screens.
note

buttonColor/buttonTextColor/bulletTextColor are kept independent from primaryColor/onPrimaryColor/textSecondaryColor for backwards compatibility. To apply a single brand color, set both members of each pair.

Dark Mode (isDarkTheme and darkColors)

Added in v1.6.11. The SDK can switch to a dark theme based on the state reported by the host app. This decision is never inferred by the SDK from the system setting or the device's night mode — the host app must explicitly report its own dark-mode state (e.g. the result of isSystemInDarkTheme(), or the user's in-app theme preference) via isDarkTheme.

ParameterTypeDescription
isDarkThemeBooleanWhether the SDK should use the darkColors palette. Default: false (light).
darkColorsDSL blockAn optional dark-theme color palette carrying the same 16 fields as colors. Only takes effect when isDarkTheme(true).
note

If the darkColors { } block is never called, or a field is left unset, the SDK falls back to its own built-in dark palette when isDarkTheme(true) — no extra color definitions are required from the host.

Dark Mode Usage

    // Falling back to the SDK's built-in dark palette:
val uiConfig = buildUIConfig {
isDarkTheme(true)
}

// Supplying the host's own brand colors for dark mode:
val uiConfig = buildUIConfig {
isDarkTheme(true)
darkColors {
primaryColor(0xFF4C6FFF.toInt())
surfaceColor(0xFF1E1E1E.toInt())
backgroundColor(0xFF121212.toInt())
}
}

typography

ParameterTypeDescription
fontFamily@FontRes IntFont family used across the SDK (R.font.<file>). If unset, the system font is used.
titleFontSizeInt (sp)Font size for titles. (Default: 28)
bodyFontSizeInt (sp)Font size for body text. (Default: 16)
labelFontSizeInt (sp)Font size for small labels (bullets, camera warnings). (Default: 14)
timerFontSizeInt (sp)Font size for the countdown text on liveness/timer screens. (Default: 32)
buttonFontSizeInt (sp)Font size for button labels. (Default: 16)
titleFontWeightIntFont weight for title text (100–900). (Default: 700)
bodyFontWeightIntFont weight for body/label text. (Default: 400)

shapes

ParameterTypeDescription
buttonCornerRadiusInt (dp)Corner radius of buttons. (Default: 12)
cardCornerRadiusInt (dp)Corner radius of warning cards / hint boxes. (Default: 8)
imageFrameCornerRadiusInt (dp)Corner radius of image / animation frames. (Default: 18)
bottomSheetCornerRadiusInt (dp)Corner radius of bottom sheet top edges. (Default: 28)
cameraOverlayCornerRadiusInt (dp)Corner radius of the camera overlay cutout. (Default: 12)

VideoCall images (root level)

ParameterTypeDescription
setVideoCallExternalLogoImage@DrawableRes IntAdded in v1.1.0. Specifies the external logo image to be displayed on the VideoCall screen.
setVideoCallSplashScreenImage@DrawableRes IntAdded in v1.1.0. Specifies the splash screen image displayed before VideoCall starts.

UIConfig Usage

    val uiConfig = buildUIConfig {
colors {
primaryColor(0xFF1643E4.toInt())
buttonColor(0xFF1643E4.toInt())
buttonTextColor(0xFFFFFFFF.toInt())
bulletTextColor(0xFF808080.toInt())
lineButtonTextColor(0xFF000000.toInt())
surfaceColor(0xFFFFFFFF.toInt())
overlayColor(0x80141414.toInt())
}
typography {
fontFamily(R.font.brand_regular)
titleFontSize(28)
buttonFontSize(16)
}
shapes {
buttonCornerRadius(30)
bottomSheetCornerRadius(28)
}
setVideoCallExternalLogoImage(R.drawable.ic_logo_sample)
setVideoCallSplashScreenImage(R.drawable.ic_logo_sample)
}

TTSConfig

Configures the text-to-speech reading of step instructions. It is provided on the KYC builder with ttsConfig(...). All parameters are optional; the defaults reproduce the SDK's previous behavior.

TTSConfig Features

ParameterTypeDescription
isEnabledBooleanWhether text-to-speech is active. false silences all SDK speech. Default: true.
languageStringBCP-47 language tag used to select the system voice. Default: "tr-TR".
voiceNameString?Preferred voice name (e.g. "ru-ru-x-ruf-local"). If found on the device, this voice is used directly; otherwise the best offline voice is used. When null, the best available offline voice is selected automatically. Default: null.
speechRateFloatSpeech speed multiplier. 1.0 is the normal Android rate. Default: 1.3.
volumeFloatPlayback volume. Range: 0.0 (silent) – 1.0 (full). Default: 1.0.
pitchMultiplierFloatVoice pitch multiplier. Range: 0.5 (lower) – 2.0 (higher). Default: 1.0.
preUtteranceDelayLongSilence inserted before each utterance (ms). Default: 0.
postUtteranceDelayLongSilence inserted after each utterance (ms). Default: 0.

TTSConfig Usage

    val ttsConfig = TTSConfig(
isEnabled = true,
language = "en-US",
speechRate = 1.3f,
volume = 1.0f,
pitchMultiplier = 1.0f,
preUtteranceDelay = 0L,
postUtteranceDelay = 0L
)

val kyc = buildKYC {
ttsConfig(ttsConfig)
}

KYC

This is the main function that will start the KYC process. All specified features are added here, and a KYC flow is initiated with the process function.

KYC Features

ParameterTypeDescription
baseUrlStringThe baseUrl to be used globally in the application, the URL from the on-premise server.
videoCallBaseUrlStringThe URL to be used for the VideoCall flow, the URL from the on-premise video call server.
videoCallProviderStringAdded in v1.6.11. Selects the video call provider. If a provider other than the default is to be used, the value to pass is supplied to you; roomName must then also be set.
roomNameStringAdded in v1.6.11. The video call room name. Must be set when a video call provider other than the default is used.
addUIConfigUIConfigUsed to specify UI configuration features globally across the SDK.
showCompletedScreenBooleanSpecifies whether to display the success screen when all steps are successfully completed.
completedScreenTextsCompletedScreenTextsAdded in v1.6.0. Used to customize the title, description and button text of the success screen.
languageStringAdded in v1.6.0. Sets the SDK language ("tr", "en", "ru"). Falls back to the device language when unset.
identifierStepsMutableList<Step>Ensures all steps are included in the system with the created features.
addClientTokenStringUsed to pass the client token required to initialize the SDK.
addApplicationIdStringUsed to pass the applicationId required to initialize the SDK.
addErrorMessagesHashMap<KYCError, String>Used to display custom error messages in the SDK. KYCError is the common interface implemented by every error enum listed under Error Handling below.
securityCheckEnabledBooleanAdded in v1.6.11. Enables device compromise checks (root/emulator/hook detection). Disabled by default; when enabled, detection always emits a SecurityWarning event, and additionally blocks the flow with a fail screen in non-debug builds.
onEventKYCEventCan be used to forward events from the SDK to third-party analytics tools like Firebase, Mixpanel, or Countly.
onErrorKYCErrorCan be used to log error messages generated by the SDK.
onCompletionBooleanDeprecated; use onProcessFinished instead. Will be removed entirely in the next major version; still called for backward compatibility for now.
onProcessFinishedKYCProcessResultNotifies the host app when the KYC flow finishes as successful, failed, or cancelled.
shouldGetCustomerLocationBooleanSpecifies whether the user's location information should be collected.
sslPinsList<String>Used to add the necessary sha256 keys for SSL pinning.
ttsConfigTTSConfigUsed to customize the text-to-speech behavior. See the TTSConfig section for details.
updateUIConfigUIConfigUsed to update the SDK's appearance while the flow is running; called on the KYC object. Useful for applying a new UIConfig immediately when the host app switches between dark and light themes. Safe to call from any thread.
processContextUsed to initialize the SDK for a KYC flow with the specified features.
dismissKYCBooleanUsed to stop and close the active KYC flow programmatically.

KYC Usage

    val kyc = buildKYC {
addUIConfig(uiConfig)
showCompletedScreen(true)
completedScreenTexts(CompletedScreenTexts.buildCompletedScreenTexts {
titleText("Your account is verified!")
descriptionText("You can now continue using the app.")
buttonText("Continue")
})
language("en")
videoCallProvider("<provider>")
roomName("room-12345")
securityCheckEnabled(true)
identifierSteps(mutableListOf(front,hologram,back,nfc,liveness,passport,videoCall,selfie,videoRecord,kps))
addClientToken(AppSharedPref.getClientToken(context))
addApplicationId(AppSharedPref.getAppId(context))
addErrorMessages(hashMapOf(
NFCError.NFC_NOT_ENABLED to "not enable",
CameraSourceError.FLASH_TOGGLE_FAILED to " flash mode"))
onEvent { Log.i("TEST_LOG", "KYC Event:${it.name}")}
onError { Log.i("TEST_LOG", "KYC Error:${it.type} - ${it.message}")}
onProcessFinished { result ->
when (result) {
KYCProcessResult.Successful -> Log.i("TEST_LOG", "KYC Successful")
is KYCProcessResult.Failed -> Log.i("TEST_LOG", "KYC Failed step:${result.stepName} reason:${result.reason}")
is KYCProcessResult.Cancelled -> Log.i("TEST_LOG", "KYC Cancelled step:${result.stepName} reason:${result.reason}")
}
}}
kyc.process(context)
kyc.dismissKYC()
note

KYCProcessResult.Failed and KYCProcessResult.Cancelled also carry a reason field alongside stepName (Failed.reason: String, Cancelled.reason: KYCCancelReason). This field holds the actual reason the flow failed or was cancelled; it's recommended to log result.reason as well for diagnostics and support.

Error Handling (KYCError)

All errors the SDK may raise are grouped into enums implementing a common KYCError interface. Error messages that need to be changed can be overridden via addErrorMessages in the form of KYCError, String. For example: CameraSourceError.FLASH_TOGGLE_FAILED to "flash mode".

caution

Error types were renamed in v1.6.11. This is a breaking change with no backward-compatibility shim or deprecated alias — host code written against the old names will not compile until updated:

  • KYCError (enum) → SDKErrorKYCError is now the name of the common interface implemented by every error enum below.
  • KYCCameraErrorCameraSourceError
  • KYCNFCErrorNFCError

Some individual error cases were also renamed or merged — see the "(previously ...)" notes in the tables below.

SDKError (previously KYCError)

ParameterDescription
UNKNOWNUnknown error.
FIRST_STEP_UNDEFINEDThe first step cannot be null!
APP_IDENTIFIER_STEPS_IS_NOT_SAME_APIThe steps you define in the application and the steps you define in the API must be the same.
UNKNOWN_NETWORK_EXCEPTIONAdded in v1.6.11. An unknown network error occurred.

SecurityError

Added in v1.6.11. Related to securityCheckEnabled(true) — see KYC Features.

ParameterDescription
DEVICE_COMPROMISEDA compromised device (root/emulator/hook) was detected.

CameraSourceError (previously KYCCameraError)

ParameterDescription
UNKNOWNAn unknown error occurred. Please try again.
APP_WENT_BACKGROUNDAdded in v1.6.11. The app was moved to the background during liveness verification. Please try again.
CAMERA_PERMISSION_DENIEDCamera permissions were not granted. Please grant camera permission. (previously PERMISSION_NOT_GRANTED / CAMERA_PERMISSION_REQUIRED, merged into this single case)
CAMERA_PERMISSION_PERMANENTLY_DENIEDCamera permission was permanently denied. Please grant camera permission from settings.
RECORD_AUDIO_REQUIREDAudio recording permission is required. Please grant audio recording permission.
RECORD_AUDIO_PERMANENTLY_DENIEDAudio recording permission was permanently denied. Please grant it from settings.
CAMERA_CONFIGURATION_FAILEDThe camera preview could not be created. Please try again. (previously CAMERA_SOURCE_PREVIEW_NOT_FOUND)
CAMERA_NOT_FOUNDCamera not found. Please check your camera. (previously CAMERA_SOURCE_NOT_FOUND)
FLASH_TOGGLE_FAILEDAn error occurred while toggling the flash. Please try again. (previously FLASH_MODE)
VIDEO_RECORDING_FAILEDAn error occurred while recording the video. Please try again. (previously VIDEO_WRITE_FAILED)
VIDEO_READ_FAILEDVideo not found. Please check that the file exists.
VIDEO_EXECUTE_COMMAND_CANCELLED_BY_USERVideo editing was cancelled by the user.
VIDEO_EXECUTE_COMMANDS_FAILEDVideo editing failed. Please try again.
VIDEO_COMPRESS_FAILEDVideo compression failed. Please try again.
CODEC_NOT_SUPPORTEDVideo editing failed. Please try again.
BACK_CAMERA_NOT_WORKINGAdded in v1.6.11. The back camera is not working.
FRONT_CAMERA_NOT_WORKINGAdded in v1.6.11. The front camera is not working.
FRONT_CAMERA_NOT_FOUNDAdded in v1.6.11. Front camera not found.
BACK_CAMERA_NOT_FOUNDAdded in v1.6.11. Back camera not found.

NFCError (previously KYCNFCError)

ParameterDescription
UNKNOWNAn unknown error occurred. Please try again.
DEVICE_NOT_HAVE_NFCThe device has no NFC module. This feature only works on NFC-capable devices.
DISABLE_NFC_ADAPTERAn error occurred while disabling the NFC module. Please re-enable NFC.
NFC_NOT_ENABLEDThe NFC module is not active. Please enable NFC. (previously NOT_ENABLE)
NOT_DISCOVEREDThe identity document could not be scanned while NFC was on. Please bring the document close again.
TAG_NOT_SUPPORTEDThe identity information is not supported. This identity card is not supported.
TAG_LOSTThe identity information could not be read. Please bring the document close again.
ISO_DEP_NOT_SUPPORTEDThe identity information could not be read. Please bring the document close again. (previously ISODEP_NOT_FOUND)
PASSIVE_AUTH_FAILEDThe identity information could not be verified. Please use a valid identity document.
PHOTO_NOT_FOUNDThe identity card has no photo information. Please use a valid identity document.
PERSON_DETAIL_NOT_FOUNDPersonal information is required. Please place the identity document correctly.
CARD_AUTH_FAILEDThe identity information could not be authenticated.
WRONG_MRZ_STRINGThe MRZ information could not be read. Please bring the document close again.
note

A separate, localized error message shown to the user when NFC verification fails for a generic reason (TR/EN/RU) was added in v1.6.11.

ScreenRecordingError

Added in v1.6.11. Errors from the Liveness step's screen-recording upload flow.

ParameterDescription
SCREEN_RECORDING_NOT_AVAILABLEThis KYC package does not support screen recording, so the process cannot continue. Raised when the backend requires screen recording while a -no-record artifact is in use.
MEDIA_PROJECTION_NOT_FOUNDScreen recording could not be started. The required media projection was not found.
MEDIA_PROJECTION_NOT_SUPPORTEDYour device does not support screen recording.
MEDIA_RECORDER_NOT_FOUNDThe media recorder could not be started.
MEDIA_VIRTUAL_DISPLAY_NOT_FOUNDScreen recording could not be started.
VIDEO_READ_FAILEDThe recorded video file could not be read.
RESULT_DATA_OR_CODE_NOT_FOUNDThe permission data required for screen recording could not be obtained.
MEDIA_RECORDER_STOP_FAILEDThe recorder could not be stopped properly.
FILE_PATH_NOT_CREATEDThe recording file could not be created.

NetworkError

Added in v1.6.11.

ParameterDescription
UNKNOWNAn unknown network error occurred. Please try again.
REQUEST_FAILEDThe request failed. Please check your internet connection and try again.
REQUEST_FAILED_WITH_STATUS_CODEThe request failed. Please check your internet connection and try again.
DECODING_FAILEDThe incoming data could not be decoded. Please try again.

ServerError

Added in v1.6.11.

ParameterDescription
UNKNOWNA server communication error occurred. Please try again.
UNEXPECTEDAn unexpected error occurred. Please try again.

TimeOutError

Added in v1.6.11.

ParameterDescription
TIME_OUTThe operation timed out. Please try again.

RejectedError

Added in v1.6.11.

ParameterDescription
REJECTEDThe operation was rejected. Please try again.
MAX_RETRY_COUNT_EXCEEDEDThe maximum number of attempts was reached.

IdentityReadFailedError

Added in v1.6.11.

ParameterDescription
IDENTITY_READ_FAILEDThe operation failed. Please try again.

DocumentAutoDetectError

Added in v1.6.11. Document auto-detection errors (glare/brightness/multiple documents).

ParameterDescription
UNKNOWNThe identity document could not be read. Please try again.
MULTIPLE_DOCUMENTS_DETECTEDPlease show only one document.
GLARE_DETECTEDGlare detected. Please hold the document at a different angle.
GLARE_NOT_DETECTEDNo glare detected on the identity document. Looks good.
TOO_BRIGHTThe environment is too bright. Please reduce the lighting.
TOO_DARKThe environment is too dark. Please move to a brighter location.

VideoRecordError

Added in v1.6.11.

ParameterDescription
TIME_OUTThe recording time expired. Please try again.
RECORDING_FAILEDAn error occurred while recording. Please try again.
NO_DATANo recording data was received. Please try again.

PermissionError

Added in v1.6.11.

ParameterDescription
LOCATION_PERMISSION_DENIEDLocation permission was not granted. Please grant location permission.

VideoCallError

Added in v1.6.11.

ParameterDescription
CLOSEDWe can't continue the process because you left the video call. Please restart to continue.
FAILThe video call ended unsuccessfully.