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 "scanovate_colombia_@latest.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: 'scanovate_colombia_@latest', 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_demo.ScanovateHandler;
import mabel_tech.com.scanovate_demo.ScanovateSdk;
import mabel_tech.com.scanovate_demo.model.CloseResponse;
import mabel_tech.com.scanovate_demo.network.ApiHelper;
import mabel_tech.com.scanovate_demo.network.RetrofitClient;
The CloseResponse object will contain the results of the transaction, providing detailed feedback on the validation process.
Example Implementation
For a practical example of how to implement the Scanovate SDK in your Android application, refer to the following steps:
onCreate method. This setup includes buttons for starting the enrollment and verification processes, a text view for displaying results, and an edit text for user input.
Invoke the SDK: Use the ScanovateSdk.start method to launch the Scanovate SDK. This method requires several parameters, including language, project name, API key, product ID, and the SDK URL. It also allows you to specify the type of capture (e.g., liveness detection, document capture) and whether to capture the front or back side of a document.
Handle Callbacks: Implement ScanovateHandler to manage success and failure callbacks. On success, process the CloseResponse object to display the transaction result. On failure, handle errors accordingly.
Example
// Example capture method implementationScanovateSdk.start( this, // Contex "1", // documentType 1, //productId "1", //RiskId "https://api-qa.ado-tech.com/api/EventTracer/", //Url_TracerBackendServices customerID, //CustomerID (CID) sessionID, //SessionID (SID) "LuloBankQA", //projectName "F99264E00A2FEA7", //apiKey "https://adocolumbia.ado-tech.com/LuloBankQA/api/", //UrlBase numberIdentification, //numberIdentification ImmersiveMode, // Inmersive Modo verification, //verification "admin", //userName "0f2ebb2d8b575d53251ba6704f762cd789bb592b", //password object : ScanovateHandler { override fun onSuccess(response: CloseResponse?, code: Int, uuidDevice: String?) { // Respuesta las salidas del SDK } override fun onFailure(response: CloseResponse?) { // Respuesta las salidas del SDK } } )
Parameters Explained
UserName: The username or identifier required for authentication using the OAuth 2.0 protocol. Password: A password that has been hashed using the SHA-1 encryption algorithm for secure storage or validation. CustomerID: client identifier (Optional)
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.