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.
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 with identomat API
1
Get a session token
2
Configure flags
3
Get the instance of identomat SDK
4
Pass Session Token and Handle callback
5
Start identomat SDK
6
Pass additional variables
1. Get a session token
Every identification process has its session token. To start the SDK, we first need to generate a token. To generate the session, we require a Company Key. The Company Key is a string key provided by Identomat.
It’s important to note that the session token must be generated on the server side and sent to the client. Do not include the Company Key in your app.
For demonstration purposes, the session token is being generated in the example app.
Session Token Request:
URL: <domain>/external-api/begin
URL Parameters:
company_key
flags
The flags parameter is a JSON object that needs to be converted to a string and URL-encoded to be URL-safe.
The response from the API call above will be a session token. This session token needs to be passed to the instance of the Identomat object to begin the identification process.
2. Configure flags
The passed flags define the SDK's functionality. Below is an explanation of what each flag does:
"language" : string – Defines the language of the SDK. Allowed values: "en", "ka", "ru", "es", "uk", "uz".
"liveness" : boolean – Defines the method of liveness.
true – Liveness check
false – Match to photo method
"new_liveness" : boolean – Defines the method for the new liveness check.
"allow_document_upload" : boolean – Allows the user to upload a document instead of scanning it.
"skip_document" : boolean – Skips the document capture step and goes directly to the face capture.
"skip_face" : boolean – Skips the face capture step.
"require_face_document" : boolean – Adds an additional step where the user is required to capture themselves holding a document.
"skip_agreement" : boolean – Skips the agreement page.
"server" : string –
"human" – Makes a call to an operator.
"computer" – Uses the default SDK method.
"document_types" : ["id", "passport", "driver_license", "residence_license"] – Specifies the types of documents allowed for capture.
"allow_general_document_capture" : boolean – Allows general document capture.
"allow_general_document_upload" : boolean – Allows general document upload.
3. 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:
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;
});
5. Start Identomat SDK
The library will provide us with the Intent for the SDK's main activity, which we can start like this:
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:
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
"title_font" to null, --sets title font type -> Typeface?
"head1_font" to null, --sets head1 font type -> Typeface?
"head2_font" to null, --sets head2 font type -> Typeface?
"body_font" to null, --sets body font type -> Typeface?
"title_font_size" to 20, --sets same font sizes type -> Int
"head1_font_size" to 20,
"head2_font_size" to 16,
"body_font_size" to 11,
)
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_disagree">Disagree</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_ukr_driver_license">Ukrainian Driver license</string>
<string name="identomat_ukr_driver_license_front_instructions">Scan FRONT SIDE of DRIVER LICENSE</string>
<string name="identomat_ukr_driver_license_front_upload">Upload FRONT SIDE of DRIVER LICENSE</string>
<string name="identomat_ukr_driver_license_rear_instructions">Scan BACK SIDE of DRIVER LICENSE</string>
<string name="identomat_ukr_driver_license_rear_upload">Upload BACK SIDE of DRIVER LICENSE</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_ukr_passport">Ukrainian passport</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_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_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_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">Let\'s try again</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">Place your FACE within OVAL</string>
<string name="identomat_liveness_retry_instruction_2">Place your FACE within OVAL and follow the on-screen instructions</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">Ready for the task? \n\n When prompted, repeat \n the facial expression shown on the icons: \n\n<b> • Keep neutral face \n • Smile</b> \n\n good luck!</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">Get ready for liveness check!</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_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_enter_phone_number">Enter phone number</string>
<string name="identomat_enter_correct_number">Enter your correct phone number</string>
</resources>
4. Setting a custom logo
setLogo(view: UIView) 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"