Android SDK
Welcome to the Identomat Android SDK documentation! Here, you'll find everything you need to integrate our ID verification and KYC/AML solutions into your Android application seamlessly.
Integration Document
The Identomat library offers a user identification flow composed of various steps, combining document types with user images or videos.
Following steps are necessary to start a session using Identomat API
1. Get a session token and configure session
To start a session, you first need to acquire a session_token by calling the begin/ endpoint and configuring your verification flow.
⚠️ Note: This process is identical across Web and SDK integrations.
For full details on how to generate a session token, configure steps and flags, and start a session, please refer to the Web integration guide – Session Initialization.
Once you’ve obtained the session token, you can proceed with integrating it into your SDK flow.
2. Get the instance of Identomat SDK and pass data
The main class of the Identomat SDK is the IdentomatManager class.
IdentomatManager is a singleton class in the Identomat SDK (using Kotlin's Object class).
To get the SDK instance, you can do the following:
For Java: You can get the instance by using:
For Kotlin: You can use it as
IdentomatManager, which refers to Kotlin'sObjectclass.
3. Pass session token and handle callback
sessionToken – Response from the API:
Stringtype.
To pass the session token, we use the setUp function, which can be called like this:
The last step is to pass the callback function, which will be triggered after the user finishes interacting with the library. To do this, use the .setCallback function, which takes a function as an argument:
4. Start Identomat SDK
The library will provide us with the Intent for the SDK's main activity, which we can start like this:
5. Pass additional variables
To customize Identomat library for the app, we have some additional functions:
setColors(colors: Map)- sets specific colorssetStrings(dict : Map)- sets specific text stringssetVariables(variables : Map<String, Any?>)- sets many customizable variablesetLogo(() -> View?)- sets loading animation, takes function type, which returns view, example usage:back_button_icon- Changes the back button icon.primary_button_width– Adjusts the width of the primary button.primary_button_height– Adjusts the height of the primary button.liveness_smile_icon– Changes the liveness smile icon. Example: UIImage(named: "liveness_smile_icon")
Deprecated functions (Post version 1.0.21)
Following functions are deprecated after version 1.0.21:
5.0 setTitleFont(font : Typeface?, size : Int) - sets title font in library
5.1 setHead1Font(font: Typeface, fontsize: Int) - sets header font in library
5.2 setHead2Font(font: Typeface, fontsize: Int) - sets sub header font in library
5.3 setBodyFont(font: Typeface, fontsize: Int) - sets body text font in library
5.4 skipLivenessInstructions() - skips liveness instructions
5.5 setLivenessIcons(neutralFace: Int, smileFace: Int) - sets liveness icons, send resource int like this: R.drawable.ic_liveness_neutral_icon
5.6 setLivenessRetryIcon(retryIcon: Int?, size : Int) - sets liveness retry panel's main icon, size sets size of icon
5.7 setRetryIcon(retryIcon: Int?, size : Int) - sets document scan view's retry panel's main icon, size sets size of icon
5.8 setCameraDenyIcon(cameraDenyIcon: Int?, size : Int) - sets document scan view's retry panel's main icon
5.9 setButtonCornerRadius(radius : Int) - sets every button corner radius
5.10 setPanelElevation(elevation : Int) - sets panels elevations
1. Customizing Colors
Use the setColors function to adjust the colors in the library to match the app's theme. Pass a dictionary containing the relevant color keys and their corresponding hex values:
Example of dictionary
for Java:
for Kotlin:
Way to pass colors to library: IdentomatManager.setColors(colors: colors)
2. Customizing strings
To customize the strings that the library displays at specific places, we have the function setStrings(string: Map).
The setStrings function takes a Map where the keys correspond to the string identifiers used in the library, and the values are the strings you want to display for different languages. The structure looks like this:
Example for Java:
for Kotlin:
Every string has it's key in library and it can be changed. String keys list is at the end.
3. Customizing Variables
For every other customization, we use the setVariables(variables: Map<String, Any?>) function, where we pass a key-value pair map of variables.
The map structure looks like this:
String keys:
4. Setting a custom logo
setLogo(() -> View?) This function is used for setting a custom logo in the library. You can pass your own custom view, and display anything on that view (animations, images, etc.). This logo will be displayed when the library is processing something.
Last updated
Was this helpful?
