For the complete documentation index, see llms.txt. This page is also available as Markdown.
android

Installation Guide

Install and configure Certta for Android. Learn SDK requirements, permissions, repositories, dependencies, session setup, runtime token updates, and color theming.

Installing the SDK for Android

This guide will walk you through the complete setup process required to successfully download, configure, and install the SDK on your machine

Requirements

Before integrating, ensure your environment meets the minimum requirements for the Certta SDK:

Requirement
Version

Min SDK Version (minSdk)

26

Android Compile version (compileSDK)

34

Min Kotlin version

1.9.10

Gradle version

8.4

Android Gradle Plugin (AGP)

8.3.2

Permissions

To enable the required network and camera functionality for the Certta SDK, you must declare the appropriate permissions and hardware features in your project's AndroidManifest.xml file.

Add the following lines within your <manifest> tag:

The Document Detector requires READ_EXTERNAL_STORAGE permission when document upload is enabled.

Adding repositories

To download the Certta SDK, you must tell your Android project where to find its dependencies. You do this by configuring the dependencyResolutionManagement block located in your project's root settings.gradle.kts file.

Add the required repository URLs to your configuration:

For Groovy-based projects, include the following repositories in the settings.gradle file.

Adding dependencies

To integrate the Certta SDK into your app, add the required dependencies to your module-level (app-level) build.gradle.kts file.

Place the following line within your dependencies block:

Configuration and Customizations

Obtaining the Mobile Token

To generate your mobile token, follow this guide:

Authentication

Configuring the session

Once you have obtained your mobile token, initialize the Certta SDK inside your custom Application class. This should be done within the onCreate() method using the application context and your configuration object.

Here is an example of what your Application class might look like:

Both the userId and mobileToken are optional during the initial configuration. Furthermore, these values are not permanent; you can update or change them at any time during the application lifecycle as your requirements evolve.

CerttaConfiguration Parameters

Parameter
Type
Description

mobileToken

String

Your generated JSON Web Token (JWT).

userId

String

A unique identifier for the user.

securityEnabled

Boolean

Enables or disables security validations.

environment

CerttaEnvironment

Defines the execution environment.

Runtime Configuration Updates

The userId and mobileToken are not restricted to the initial setup; they can be updated dynamically at runtime to accommodate changes in user sessions or security requirements.

To update these values, use the specific methods provided by the Certta instance:

Color theming

Both the Liveness and Document Detector modules support custom color theming, allowing you to seamlessly match the SDK's interface to your application's brand guidelines. You can personalize the UI by providing color values in a standard hexadecimal string format (e.g., "#RRGGBB").

After configuring the SDK, create a CerttaColorConfiguration object with the colors you want to change, and pass it to Certta.instance.setColorConfiguration().

ColorConfiguration Parameters

All parameters in the configuration object are optional. You only need to define the specific colors you wish to override for your custom theme.

Color Property
Description

primaryColor

Main color for buttons and highlights.

secondaryColor

Secondary color for complementary elements.

backgroundColor

Screen background color.

contentColor

Color used for texts and icons.

mediumColor

Neutral color for elements like progress bars.

dialogBackgroundColor

Dialog and popup background color.

dialogBorderColor

Dialog and popup border color.

Code Obsfuscation

Check out the code block with the ProGuard/R8 rules necessary for SDK and its dependencies to function correctly even after code obfuscation and optimization. These rules preserve essential information (such as signatures, annotations, and internal classes) and prevent critical classes from being removed or altered.

Last updated