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.

Latest release: Version 1.1.147

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:

IdentomatManager identomatSdk = IdentomatManager.INSTANCE;
  • For Kotlin: You can use it as IdentomatManager, which refers to Kotlin's Object class.

3. Pass session token and handle callback

  • sessionToken – Response from the API: String type.

To pass the session token, we use the setUp function, which can be called like this:

IdentomatManager.INSTANCE.setUp(token: sessionToken);

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:

IdentomatManager.INSTANCE.setCallback(() -> {
    // Go to result page;
});

4. Start Identomat SDK

The library will provide us with the Intent for the SDK's main activity, which we can start like this:

startActivity(IdentomatManager.INSTANCE.getIdentomatActivity(MainActivity.this));

5. Pass additional variables

To customize Identomat library for the app, we have some additional functions:

  1. setColors(colors: Map) - sets specific colors

  2. setStrings(dict : Map) - sets specific text strings

  3. setVariables(variables : Map<String, Any?>) - sets many customizable variable

  4. setLogo(() -> View?) - sets loading animation, takes function type, which returns view, example usage:

  5. back_button_icon- Changes the back button icon.

  6. primary_button_width – Adjusts the width of the primary button.

  7. primary_button_height – Adjusts the height of the primary button.

  8. 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:

"background_low",
"background_high",
"text_primary",
"text_secondary",
"text_placeholder",
"text_disabled",
"text_inverse",
"text_link",
"primary_button",
"primary_button_text",
"secondary_button",
"secondary_button_text",
"document_outer",
"loading_indicator_background",
"iteration_text",
"inactive_button"
"inactive_button_text"
"primary_input_stroke"
"inactive_input_stroke"
"animation_failed"
"animation_success"
"liveness_face_animation_tint"

Example of dictionary

  • for Java:

static HashMap colors = new HashMap(){{
    put("background_low", "#222222");
    put("background_high", "#2D2D2D");
    put("text_color_header", "#A4A4A4");
    put("text_color", "#676767");
    put("primary_button", "#7848FF");
    put("primary_button_text", "#FFFFFF");
    put("secondary_button", "#222222");
    put("secondary_button_text", "#FFFFFF");
    put("document_outer", "#2D2D2D");
    put("iteration_text", "#FFFFFF");
}};
  • for Kotlin:

var colors : Map<String, String> = mapOf(
    "background_low" to "#222222",
    "background_high" to "#FFFFFF",
    ...
    )

Way to pass colors to library: IdentomatManager.setColors(colors: colors)

2. Customizing stings

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:

static HashMap strings = new HashMap(){{
    put("en",  new HashMap<String, String>() {{
        put("identomat_agree", "Yes I agree");
        put("identomat_disagree", "Disagree");
    }});
    put("ru",  new HashMap<String, String>() {{
        put("identomat_agree", "Согласен");
        put("identomat_disagree", "Не согласен");
    }});
    put("es",  new HashMap<String, String>() {{
        put("identomat_agree", "Acepto");
        put("identomat_disagree", "No acepto");
    }});
    put("ka",  new HashMap<String, String>() {{
        put("identomat_agree", "ვეთანხმები");
        put("identomat_disagree", "არ ვეთანხმები");
    }});
}};

for Kotlin:

 var strings : Map<String, Map<String,String>> = mapOf(
            "en" to mapOf(
                    "identomat_agree" to "Yes I agree",
                    "identomat_disagree" to "Disagree",
            ),
            "ru" to mapOf(
                    "identomat_agree" to "Согласен",
                    "identomat_disagree" to "Не согласен",
            ),
            "es" to mapOf(
                    "identomat_agree" to "Acepto",
                    "identomat_disagree" to "No acepto",
            ),
            "ka" to mapOf(
                "identomat_agree" to "ვეთანხმები",
                "identomat_disagree" to "არ ვეთანხმები",
            )
    )

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:

var variables : MutableMap<String, Any?> = mutableMapOf(
   
    "liveness_neutral_icon" to R.drawable.ic_liveness_neutral_icon,     -- sets liveness neutral face icon.     type -> int
    "liveness_smile_icon" to R.drawable.ic_liveness_smile_icon,         -- sets liveness smile face icon.       type -> int

    "liveness_retry_icon" to R.drawable.image,                          -- sets liveness retry page icon.       type -> int
    "liveness_retry_text_icon_1" to R.drawable.image,                   -- sets liveness retry page instruction icon 1.       type -> int
    "liveness_retry_text_icon_2" to R.drawable.image,                   -- sets liveness retry page instruction icon 2.       type -> int
    "liveness_retry_text_icon_3" to R.drawable.image,                   -- sets liveness retry page instruction icon 3.       type -> int
    "liveness_retry_text_icon_4" to R.drawable.image,                   -- sets liveness retry page instruction icon 4.       type -> int

    "scan_retry_icon" to R.drawable.image,                              -- sets scan document retry page icon.  type -> int
    "camera_deny_icon" to R.drawable.image,                             -- sets camera deny page icon.          type -> int
    "upload_retry_icon" to R.drawable.image,                            -- sets upload retry page icon.         type -> int

    "liveness_retry_icon_size" to 200,                                  -- sets save icon sizes.                type -> int
    "scan_retry_icon_size" to 200,
    "camera_deny_icon_size" to 200,
    "upload_retry_icon_size" to 200,

    "liveness_retry_count" to 3,                        -- new liveness video upload retry count

    "skip_liveness_instructions" to false,              -- skips liveness instructions                          type -> boolean
    "liveness_type" to 1,                               -- chooses liveness icons display type values 1 or 2    type -> int
    "button_corner_radius" to null,                     -- sets button corner radious, if it's null button will be round cornered              
    "panel_elevation" to 1,                             -- sets panels elevation,                               type -> int

    Sets  font sizes
    "title_medium_size":20,
    "title_small_size":
    "headline_medium_size":20,
    "headline_small_size"
    "body_medium_size":11
    "body_small_size"
 
    Sets font
    "title_font":"font-name",
    "headline_font":"font-name",
    "body_font":"font-name"
    
    "default_country_code": "GE"                      -- sets default country for country code picker
)

String keys:

<resources>

    <string name="identomat_agree">Agree</string>
    <string name="identomat_title"> </string>
    <string name="identomat_agree_page_title">Consent for personal data processing</string>

    <string name="identomat_capture_method_title">Choose a method</string>

    <string name="identomat_card_front_instructions">Scan FRONT SIDE of ID CARD</string>
    <string name="identomat_card_front_upload">Upload FRONT SIDE of ID CARD</string>
    <string name="identomat_card_looks_fine">Card looks fine</string>
    <string name="identomat_card_rear_instructions">Scan BACK SIDE of ID CARD</string>
    <string name="identomat_card_rear_upload">Upload BACK SIDE of ID CARD</string>

    <string name="identomat_choose_file">Choose a file</string>

    <string name="identomat_continue">Continue</string>

    <string name="identomat_driver_license">Driver license</string>
    <string name="identomat_driver_license_front_instructions">Scan FRONT SIDE of DRIVER LICENSE</string>
    <string name="identomat_driver_license_front_upload">Upload FRONT SIDE of DRIVER LICENSE</string>
    <string name="identomat_driver_license_rear_instructions">Scan BACK SIDE of DRIVER LICENSE</string>
    <string name="identomat_driver_license_rear_upload">Upload BACK SIDE of DRIVER LICENSE</string>

    <string name="identomat_vehicle_registration_certificate_front">Upload FRONT SIDE of VEHICLE REGISTRATION CERTIFICATE</string>
    <string name="identomat_vehicle_registration_certificate_back">Upload BACK SIDE of VEHICLE REGISTRATION CERTIFICATE</string>
    
    <string name="identomat_face_instructions">Place your FACE within OVAL</string>
    <string name="identomat_face_looks_fine">Face looks fine</string>

    <string name="identomat_card">ID card</string>
    <string name="identomat_im_ready">I\'m ready</string>
    <string name="identomat_initializing">Initializing...</string>
    <string name="identomat_lets_try">Let\'s try</string>

    <string name="identomat_passport">Passport</string>
    <string name="identomat_passport_instructions">Passport photo page</string>
    <string name="identomat_passport_upload">Upload passport photo page</string>

    <string name="identomat_record_begin_section_1">Take a neutral expression</string>
    <string name="identomat_record_begin_section_2">Smile on this sign</string>
    <string name="identomat_record_begin_section_3">Take a neutral expression again</string>
    <string name="identomat_record_begin_title">Get ready for your video selfie</string>

    <string name="identomat_liveness_record_begin_title">Get ready for your video selfie</string>
    <string name="identomat_liveness_record_begin_subtitle">When prompted, repeat the facial expression shown on the icons.</string>
    <string name="identomat_liveness_record_begin_section_title">Tips</string>
    <string name="identomat_liveness_record_begin_section_1">First, position your face in the frame</string>
    <string name="identomat_liveness_record_begin_section_2">Hold still until success notify</string>
    <string name="identomat_im_ready">I\'m ready</string>
    
    <string name="identomat_passive_record_begin_title">Get ready for your video selfie</string>
    <string name="identomat_passive_record_begin_subtitle">Follow the on-screen instructions when prompted.</string>
    <string name="identomat_passive_record_begin_section_title">Tips</string>
    <string name="identomat_passive_record_begin_section_1">Frame your face</string>
    <string name="identomat_passive_record_begin_section_2">Hold still until success notify</string>

    <string name="identomat_passive_record_begin_subtitle_smile">When prompted, repeat the facial expression shown on the icons.</string>

    <string name="identomat_record_fail_description">But first, please take a look at the instructions</string>
    <string name="identomat_record_fail_title">Let\'s try again</string>
    <string name="identomat_record_instructions">Place your FACE within OVAL and follow the on-screen instructions</string>

    <string name="identomat_residence_permit">Residence permit</string>
    <string name="identomat_residence_permit_front_instructions">Scan FRONT SIDE of RESIDENCE PERMIT</string>
    <string name="identomat_residence_permit_front_upload">Upload FRONT SIDE of RESIDENCE PERMIT</string>
    <string name="identomat_residence_permit_rear_instructions">Scan BACK SIDE of RESIDENCE PERMIT</string>
    <string name="identomat_residence_permit_rear_upload">Upload BACK SIDE of RESIDENCE PERMIT</string>

    <string name="identomat_expired_date_was_not_found">Expiry date was not found in the document</string>
    <string name="identomat_issued_date_was_not_found">Issue date was not found in the document</string>
    <string name="identomat_full_name_does_not_match">Full name does not match</string>
    <string name="identomat_full_name_was_not_found">Full name was not found in the document</string>
    <string name="identomat_issuing_authority_name_was_not_found">Issuing authority name was not found in the document</string>
    <string name="identomat_street_address_was_not_found">Street address was not found in the document</string>
    <string name="identomat_document_expired">Document is expired</string>
    <string name="identomat_address_not_valid">Address not valid</string>
    <string name="identomat_document_date_is_in_the_future">Document date is in the future</string>
    <string name="identomat_document_not_matched">Document not matched</string>
    <string name="identomat_oversized_file">Oversized File: Maximum file size is 5MB</string>
    <string name="identomat_unsupported_file_type">File Format Mismatch</string>
    <string name="identomat_too_many_pages">Too many Pages: Maximum pages is 20</string>    
    
    <string name="identomat_retake_photo">Retake photo</string>
    <string name="identomat_retry">Retry</string>
    <string name="identomat_scan_code">Scan the code</string>
    <string name="identomat_scan_me">Scan me</string>
    <string name="identomat_select_document">Select document</string>
    <string name="identomat_neutral_expression">Neutral face</string>
    <string name="identomat_smile">Smile</string>
    <string name="identomat_take_photo">Take a photo</string>
    <string name="identomat_upload_another_file">Upload another file</string>
    <string name="identomat_not_smile">Smile not detected</string>
    <string name="identomat_eyes_closed">Eyes are closed</string>
    <string name="identomat_face_hold">Hold still</string>
    <string name="identomat_no_face">Face is missing</string>
    <string name="identomat_face_covered">Face is covered</string>

    <string name="identomat_upload_file">Upload a file</string>
    <string name="identomat_uploading">Uploading...</string>
    <string name="identomat_verifying">Verifying...</string>

    <string name="identomat_upload_instructions_1">Upload a color image of the entire document</string>
    <string name="identomat_upload_instructions_2">JPG or PNG format only</string>
    <string name="identomat_upload_instructions_3">Screenshots are not allowed</string>

    <string name="identomat_document_align">Frame your document</string>
    <string name="identomat_document_blurry">Document is blurry</string>
    <string name="identomat_document_face_blurry">Face on document is blurry</string>
    <string name="identomat_document_face_require_brighter">Low light</string>
    <string name="identomat_document_face_too_bright">Avoid direct light</string>
    <string name="identomat_document_move_away">Please move document away</string>
    <string name="identomat_document_move_closer">Please move document closer</string>
    <string name="identomat_document_move_down">Please move document down</string>
    <string name="identomat_document_move_left">Please move document to the left</string>
    <string name="identomat_document_move_right">Please move document to the right</string>
    <string name="identomat_document_move_up">Please move document up</string>
    <string name="identomat_document_type_unknown">Unknown document type</string>
    <string name="identomat_document_covered">Document is covered</string>
    <string name="identomat_document_grayscale">Document is grayscale</string>
    <string name="identomat_document_format_mismatch">Document format mismatch</string>
    <string name="identomat_document_type_mismatch">Wrong document</string>
    <string name="identomat_document_not_readable">Document not readable</string>
    <string name="identomat_document_face_align">Document face align</string>
    <string name="identomat_document_spoofing_detected2">Document spoofing detected</string>
    <string name="identomat_document_page_mismatch">Wrong page</string>
    <string name="identomat_face_look_straight">Look straight</string>
    <string name="identomat_face_mismatch">Faces do not match</string>

    <string name="identomat_face_align">Frame your face</string>
    <string name="identomat_face_away_from_center">Center your Face</string>
    <string name="identomat_face_blurry">Face is blurry</string>
    <string name="identomat_face_far_away">Move closer</string>
    <string name="identomat_face_require_brighter">Low light</string>
    <string name="identomat_face_too_bright">Avoid direct light</string>
    <string name="identomat_face_too_close">Move away</string>
    <string name="identomat_no_document_in_image">Frame your document</string>
    <string name="identomat_smile_detected">Get neutral face</string>
    <string name="identomat_upload_success">Successfully uploaded!</string>
    <string name="identomat_scan_success">Success!</string>
    <string name="identomat_scan_success_info">Document scanned successfully, Change it to other side.</string>
    <string name="identomat_liveness_success">Liveness completed successfully</string>
    <string name="identomat_camera_permission_title">Can\'t access the camera</string>
    <string name="identomat_camera_permission_text">Permission on camera is restricted, without camera, app can\'t progress forward, please go to settings and check camera permission.</string>
    <string name="identomat_audio_permission_title">Can\'t access the microphone</string>
    <string name="identomat_audio_permission_text">Permission on microphone is restricted, without microphone, call can\'t be made, please go to settings and check audio permission.</string>

    <string name="identomat_no_connection">No internet connection</string>

    <string name="identomat_scan_retry_title">Capture failed</string>
    <string name="identomat_scan_retry_instruction">Please try again in better lighting</string>
    <string name="identomat_scan_retry_again">Try again</string>
    <string name="identomat_scan_retry_cancel">Cancel process</string>

    <string name="identomat_liveness_retry_title">We can\'t detect your face</string>
    <string name="identomat_liveness_retry_instruction">But first, please take a look at the instructions</string>
    <string name="identomat_liveness_retry_again">Try again</string>
    <string name="identomat_liveness_retry_instruction_1">Make sure to be in a place with good lighting</string>
    <string name="identomat_liveness_retry_instruction_2">Make sure your eyes are clearly visible</string>
    <string name="identomat_liveness_retry_instruction_3">Make sure to remove masks or other items that cover your face. Eyeglasses are okay</string>
    <string name="identomat_liveness_retry_instruction_4">Make sure to only show your face, we don’t need to see your ID</string>

    <string name="identomat_camera_deny_title">Camera access denied</string>
    <string name="identomat_camera_deny_settings">Allow access</string>
    <string name="identomat_camera_deny_cancel">Cancel process</string>

    <string name="identomat_cascading_instructions">When prompted, repeat the facial expression shown on the icons: \n\n<b>• Keep neutral face \n• Smile</b></string>
    <string name="identomat_cascading_instructions_title">When prompted, repeat the facial expression shown on the icons:</string>
    <string name="identomat_cascading_instructions_1">• Keep neutral face</string>
    <string name="identomat_cascading_instructions_2">• Smile</string>
    <string name="identomat_cascading_button">Start Liveness Check</string>
    <string name="identomat_cascading_neutral_face">Keep neutral face</string>
    <string name="identomat_cascading_start">Position your face!</string>
    <string name="identomat_cascading_smile">Smile!</string>
    <string name="identomat_cascading_fail">Liveness Failed</string>
    <string name="identomat_cascading_success">That\'s it!</string>

    <string name="identomat_resend_code">Resend Code</string>
    <string name="identomat_get_code">Get Code</string>
    <string name="identomat_sms_title">Verify Phone Number</string>
    <string name="identomat_sms_subtitle">Enter your correct phone number\nto get verification code</string>
    <string name="identomat_resend_in">Resend code in </string>
    <string name="identomat_invalid_number">Please enter valid number</string>
    <string name="identomat_invalid_code">The code is not valid</string>
    <string name="identomat_sms_code_sent">Enter the 4-digit verification code sent to </string>
    <string name="identomat_enter_sms_code">Enter SMS code</string>
    <string name="identomat_phone_number_hint">Phone number</string>
    <string name="identomat_enter_phone_number">Enter phone number</string>
    <string name="identomat_enter_correct_number">Enter your correct phone number</string>
    <string name="identomat_confirm">Confirm</string>


    <string name="identomat_enter_email_address">Enter email address</string>
    <string name="identomat_enter_correct_email">Enter your correct email address</string>
    <string name="identomat_enter_valid_email">Please enter valid email</string>
    <string name="identomat_email_hint">example@gmail.com</string>

    <string name="identomat_search">Search</string>
    
    <string name="identomat_agreement_header"> </string>
    <string name="identomat_require_email_header"> </string>
    <string name="identomat_require_phone_number_header"> </string>
    <string name="identomat_require_phone_number_check_header"> </string>
    <string name="identomat_enter_sms_code_header"> </string>
    <string name="identomat_select_documents_header"> </string>
    <string name="identomat_capture_methods_header"> </string>
    <string name="identomat_upload_header"> </string>
    <string name="identomat_new_liveness_header"> </string>
    <string name="identomat_camera_access_header"> </string>
    <string name="identomat_select_country">Select country</string>
    <string name="identomat_retry_header"> </string>
    

</resources>

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.


Liveness Retry String Keys:

  • liveness_retry_title: "We can't detect your face"

  • liveness_retry_instruction_1: "Make sure to be in a place with good lighting"

  • liveness_retry_instruction_2: "Make sure your eyes are clearly visible"

  • liveness_retry_instruction_3: "Make sure to remove masks or other items that cover your face. Eyeglasses are okay"

  • liveness_retry_instruction_4: "Make sure to only show your face, we don’t need to see your ID"

Last updated

Was this helpful?