Android SDK Guide

This guide provides detailed instructions for integrating the Scanovate Colombia SDK into your Android application, enabling robust identity validation processes through facial biometric verification.

Requirements and Compatibility

Before starting the integration process, ensure your development environment meets the following requirements:

Installation

1. Add the library

Download the "hybridComponent_3_0_0_17.aar" library and add it to your project's libs folder. Ensure you configure your project's build.gradle file to include the library as a dependency:

dependencies {
    implementation(name: 'hybridComponent_3_0_0_17', ext: 'aar')
}

2. Import Required Libraries

Add the following imports in your activity or fragment where you intend to use the Scanovate SDK:

Java

import mabel_tech.com.scanovate_sdk.ScanovateSDK; 

import mabel_tech.com.scanovate_demo.HybridComponent;
import mabel_tech.com.scanovate_sdk.SdkResultHandler;
import mabel_tech.com.scanovate_sdk.data.model.ComponentCloseResult;

The CloseResponse object will contain the results of the transaction, providing detailed feedback on the validation process.

Implement in app/build.gradle:
dependencies {
    implementation(files("libs/hybridComponent_3_0_0_17.aar"))

    // Dependencies required by the SDK
    implementation(platform("androidx.compose:compose-bom:2026.02.00"))
    implementation("androidx.compose.ui:ui")
    implementation("androidx.compose.material3:material3:1.5.0-alpha14")
    implementation("androidx.activity:activity-compose:1.12.4")
    implementation("androidx.navigation:navigation-compose:2.7.7")
    implementation("androidx.lifecycle:lifecycle-viewmodel-compose:2.8.0")
    implementation("androidx.lifecycle:lifecycle-runtime-compose:2.8.0")
    implementation("androidx.security:security-crypto:1.1.0-alpha06")
    implementation("com.squareup.retrofit2:retrofit:2.9.0")
    implementation("com.squareup.retrofit2:converter-gson:2.9.0")
    implementation("com.squareup.okhttp3:okhttp:4.12.0")
    implementation("com.google.code.gson:gson:2.10.1")
    implementation("com.google.accompanist:accompanist-permissions:0.34.0")
    implementation("com.google.android.gms:play-services-location:21.3.0")
    implementation("org.jetbrains.kotlinx:kotlinx-coroutines-play-services:1.8.1")
    implementation("com.airbnb.android:lottie-compose:6.4.0")
}

Permissions
The SDK declares the necessary permissions in its own manifest. These are automatically merged upon compilation. Manual declaration is not required.

<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.CAMERA" />
<uses-permission android:name="android.permission.VIBRATE" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.WAKE_LOCK" />


Example Implementation

For a practical example of how to implement the Scanovate SDK in your Android application, refer to the following steps:

The SDK offers two invocation methods: the new API (ScanovateSDK) and the legacy API (HybridComponent), which maintains full compatibility with version 3.0.0.x. Both offer the same functionality. See the Backward Compatibility section.

Example

// Example capture method implementation

ScanovateSDK.INSTANCE.start(
    this,                                          // Activity
    "1",                                           // documentType (String, número > 0)
    "es",                                          // language ("es" o "en")
    "miProyecto",                                  // projectNameSdk
    "mi-api-key",                                  // apiKeySdk
    1,                                             // productId (int > 0)
    "https://servidor.com/miProyecto/api/",        // urlSdk
    "https://tracer.com/api/EventTracer/",         // urlTracerBackendService (opcional, "" si no aplica)
    "",                                            // processId (opcional)
    1,                                             // functionCapture: 1 = Liveness, 2 = CardCapture
    true,                                          // isFrontSide: true = frente, false = reverso
    "token",                                       // token (opcional, "" si no aplica)
    "",                                            // uidDevice (opcional, el SDK genera uno si está vacío)
    new SdkResultHandler() {
        @Override
        public void onSuccess(ComponentCloseResult result) {
            // Captura exitosa
            int statusCode = result.getStatusCode();
            String message = result.getMessage();
            boolean isAlive = result.isAlive();
            String image = result.getImage();              // Base64
            String keyProcess = result.getKeyProcessLiveness();
            String uid = result.getUidDevice();
        }

        @Override
        public void onFailure(ComponentCloseResult result) {
            // Error o cancelación
            int statusCode = result.getStatusCode();
            String message = result.getMessage();
        }
    }
);

Parameters Explained
Process Transaction Results

After capturing the necessary data, use the RetrofitClient to send the data for validation and display the final state of the transaction to the user.

State Codes Reference

Be aware of the following state codes when processing responses:

This guide aims to streamline the integration process of the Scanovate Colombia SDK into your Android application, ensuring you can efficiently implement a robust identity validation system.

Demo Application

For a comprehensive example, including full source code demonstrating the integration and usage of the Scanovate Colombia SDK, visit our GitHub repository:

image.png

image.png

image.png

Scanovate Colombia SDK Demo App For Android

This demo app provides a hands-on example to help you understand how to integrate and utilize the SDK in your own applications.


Revision #17
Created 22 March 2024 21:50:02 by Admin
Updated 5 March 2026 13:38:21 by roger de avila