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.
| Platform | Min version |
|---|---|
| Android | minSdkVersion: 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 = truesetting 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:1.0.0")
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
| Parameter | Type | Description |
|-----------------|------------------|----------------------------------------------------------------------------------------------|
| toolbarTitle | `String` | Specifies the text for the toolbar. |
| titleText | `String` | Specifies the text for the title. |
| descriptionText | `String` | Specifies the text for the description. |
| buttonText | `String` | Specifies the text for the button that starts the step. |
| imageResId | `@RawRes Int` | Specifies the image to be used. |
| lottieResId | `@RawRes Int` | Specifies the Lottie animation. |
| bullets | `List<String>` | Information about the next step can be presented in bullet points. |
| bulletIcon | `@RawRes Int` | Specifies the icon for the bullet points. |
### Info Screen Usage
Below is an example of how to use the Info screen.
``` kotlin
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, VideoCall).
Step Features
| Parameter | Type | Description |
|---|---|---|
| addInfo | Info | Used to add an Info screen to the corresponding step. It is optional. |
| toolbarTitle | String | Represents the text for the Toolbar to be displayed in the corresponding step. |
| toolbarRightCloseIcon | String | Represents the exit icon to terminate the corresponding step. |
| toolbarLeftCloseIcon | String | Represents the exit icon to terminate the corresponding step. |
| identifyTimeout | Long | Specifies the timeout duration for the corresponding step (ms). e.g., 10_000 |
Front Step Usage
val front = buildFront {
identifyTimeout(30_000L)
addInfo(frontInfo)
toolbarTitle("Kimlik Ön Yüz")
toolbarRightCloseIcon(R.drawable.ic_close)
}
Back Step Usage
val back = buildBack {
identifyTimeout(30_000L)
addInfo(backInfo)
toolbarTitle("Kimlik Arka Yüz")
toolbarRightCloseIcon(R.drawable.ic_close)
}