Skip to content

Idmission-LLC/LiteSdk2SampleDemo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Module IDentity-SDK

Introduction

This guide introduces the IDentity Android SDK within the IDmission product suite. Developers, project managers and QA testers should reference this guide for information on configuration and use of the IDentity SDK on the Android platform. We recommend reviewing the entire implementation guide to fully understand the IDentity SDK functionality and its respective capabilities.

This guide details processes and procedures for embedding the IDentity SDK into your host application and utilizing its current features. For additional IDentity SDK support, please contact our Customer Support team at support@idmission.com.

Overview and Key Features

The IDmission IDentity SDK is a comprehensive toolkit that enables the use of any combination of factors of identity to complete digital transformation goals. The goal of the IDentity SDK is to offer seamless integration into an existing digital paradigm where the end-to-end customer experience is still owned and managed in-house.

Quick Links to get started with IDentity SDK for Android

SDK Flavours Download Links - As per your requirement you can downloads the below IDentitySDK / IDentityMediumSDK / IDentityLiteSDK / IDentityVideoIDSDK.

Download IDentitySDK - Directly links to the IDentitySDK Sample app on IDmission GitHub Repository
Download IDentityMediumSDK - Directly links to the IDentityMediumSDK Sample app on IDmission GitHub Repository
Download IDentityLiteSDK - Directly links to the IDentityLiteSDK Sample app on IDmission GitHub Repository
Download IDentityVideoIDSDK (Coming soon) - Directly links to the IDentityVideoIDSDK Sample app on IDmission GitHub Repository

SDK Documentation - Directly links to the Identity Proofing SDK

The main features supported in this SDK are:

Getting Started

  1. Please contact to sales@idmission.com for Login Credentials, which you will later pass to the SDK.

  2. Go to your project-level build.gradle file, and add the following in the

allprojects {  
    repositories {  
        google()  
        jcenter()  
        // important stuff below  
        maven {
            url "https://gitlab.idmission.com/api/v4/projects/220/packages/maven"
            name "GitLab"
            credentials(HttpHeaderCredentials) {
                name = "Private-Token"
                value = "WESesyuSD9fQeqNEyig6"
            }
            authentication {
                header(HttpHeaderAuthentication)
            }
        }
        //Required for fingerprint capture
        maven { url 'https://jitpack.io' }
    }  
}
  1. In your app-level build.gradle file, add the following:
android {  
    // Java 8 is required for CameraX  
    compileOptions {  
        sourceCompatibility JavaVersion.VERSION_1_8  
        targetCompatibility JavaVersion.VERSION_1_8  
    }  
    kotlinOptions {  
        jvmTarget = '1.8'  
    }  
}

//IdentityFull SDK
dependencies {  
     implementation 'com.idmission.sdk2:idmission-sdk:9.5.9.2.05'     
}

//IdentityMedium SDK
dependencies {  
     implementation 'com.idmission.sdk2:idmission-mediumsdk:9.5.9.2.05'     
}

//IdentityLite SDK
dependencies {  
     implementation 'com.idmission.sdk2:idmission-litesdk:9.5.9.2.05'     
}

//IdentityVideoID SDK
dependencies {  
     implementation 'com.idmission.sdk2:idmission-videoidsdk:9.5.9.2.05'     
}
  1. Sync your project with Gradle
  2. You may now use the library. Example usage below:
class LaunchActivity : Activity() {    

    private val launcher = IdMissionCaptureLauncher()    
     var initializeApiBaseUrl = "https://kyc.idmission.com/"
     var apiBaseUrl = "https://api.idmission.com/"
    
    override fun onCreate(savedInstanceState: Bundle?) {  
        super.onCreate(savedInstanceState)  
        setContentView(R.layout.activity_launch)
        
        //SDk initialize call
        init_button.setOnClickListener{
            CoroutineScope(Dispatchers.Main).launch {
                var response: Response<InitializeResponse>
                withContext(Dispatchers.IO) {
                    response = IdentityProofingSDK.initialize(
                        applicationContext,
                        initializeApiBaseUrl = initializeApiBaseUrl, 
                        apiBaseUrl = apiBaseUrl, 
                        loginID,
                        password,
                        merchantID,
                        enableDebug,
                        enableGPS,
                        sdkCustomizationOptions = SDKCustomizationOptions(
                            language = LANGUAGE
                                .valueOf("EN")
                        ),
                    )
                }
        }
        
    //Call Enroll Service 
        someButton.setOnClickListener {
            IdentityProofingSDK.idValidationAndcustomerEnroll(
                this,
                uniqueNumber = uniqueNumber.text.toString()) 
        }  
        
        // finalSubmit call for submit data to the server
        submitDataButton.setOnClickListener {
            CoroutineScope(Dispatchers.Main).launch {
                IdentityProofingSDK.finalSubmit(
                    applicationContext
                )
            }
        }  
     

    // capture result is received in onActivityResult    
    override fun onActivityResult(requestCode: Int, resultCode: Int, data: Intent?) {  
        data ?: return  
        if (requestCode != IdMissionCaptureLauncher.CAPTURE_REQUEST_CODE) return  
        val processedCaptures = data.extras?.getParcelableArray(IdMissionCaptureLauncher.EXTRA_PROCESSED_CAPTURES)
        // do whatever you want with the data!  
    } 

Additional supported features

Getting Started for Signature Capture

  1. In your app-level build.gradle file, add the following:
android {  
    // Java 8 is required for CameraX  
    compileOptions {  
        sourceCompatibility JavaVersion.VERSION_1_8  
        targetCompatibility JavaVersion.VERSION_1_8  
    }  
    kotlinOptions {  
        jvmTarget = '1.8'  
    }  
}

dependencies {  
     implementation 'com.idmission.sdk2:signatureLib:9.4.8.1'    
}

  1. Sync your project with Gradle
  2. To capture a signature, use the following code.
SignatureSDK.captureSignature(Activity activityContext)

SignatureSDK.captureSignature(
    Activity activityContext, 
    JSONObject captureSignatureConfig)

Signature Capture Parameters

Parameter Type Description
Parameter Type Description
activityContext Context Instance of your Activity
captureSignatureConfig JSONObject { "signature_capture_background": "N", "signature_title_label_message": "Sign 1", "signature_clear_btn_label_message": "clear 1", "signature_done_btn_label_message": "done 1", "signature_capture_detect_coordinates": "true" }
  1. You may now use the library. Example usage below:
class LaunchActivity : Activity() {    

    override fun onCreate(savedInstanceState: Bundle?) {  
        super.onCreate(savedInstanceState)  
        setContentView(R.layout.activity_launch)
        
        //SDK signature call
        signatureCapture.setOnClickListener{
        var doneBtnText = getString(R.string.done)
            var cancelBtnText = getString(R.string.clear)
            var signTitle = getString(R.string.sign_title)

            SignatureSDK.captureSignature(this@LaunchActivity, JSONObject("{ " +
                "\"signature_capture_background\": “N”, \"signature_title_label_message\": ${signTitle}, " +
                "\"signature_clear_btn_label_message\": ${cancelBtnText}, " +
                "\"signature_done_btn_label_message\": ${doneBtnText}, " +
                "\"signature_capture_detect_coordinates\": \"true\" }"))
        }
        

    // Signature result is received in onActivityResult and set this result to SDK 2.0 Api setSignatureData  
    override fun onActivityResult(requestCode: Int, resultCode: Int, data: Intent?) {  
        data ?: return  
        if (requestCode == SignatureConstants.SIGNATURE_CAPTURE_REQUEST_CODE) {
            var signatureData = data?.getStringExtra("SignatureImage")
            var signatureDataCoordinates = data?.getStringExtra("SignatureDataCoordinates")
            IdentityProofingSDK.setSignatureData(signatureData,signatureDataCoordinates)
        } else if (requestCode == SignatureConstants.SIGNATURE_CANCEL_RESPONSE_CODE) {
            // cancelled by user
            IdentityProofingSDK.setSignatureData(null,null)
        }
    } 

Getting Started for Four Fingerprint Capture

  1. In your app-level build.gradle file, add the following:
android {  
    // Java 8 is required for CameraX  
    compileOptions {  
        sourceCompatibility JavaVersion.VERSION_1_8  
        targetCompatibility JavaVersion.VERSION_1_8  
    }  
    kotlinOptions {  
        jvmTarget = '1.8'  
    }  
}

dependencies {  
    implementation 'com.idmission.sdk2:4FingerprintCaptureLib:9.5.9.2' 
}

  1. Sync your project with Gradle
  2. You may now use the library. Example usage below:
class LaunchActivity : Activity() {    

    override fun onCreate(savedInstanceState: Bundle?) {  
        super.onCreate(savedInstanceState)  
        setContentView(R.layout.activity_launch)
        
        //capture fingerprint
        fingerPrintCapture.setOnClickListener{
            val indexCapture: Boolean = true
            val middleCapture: Boolean = true
            val ringCapture: Boolean = true
            val babyCapture: Boolean = true

            val dIndexKeep = true
            val dMiddleKeep = true
            val dRingKeep = true
            val dBabyKeep = true

            val captureLeftHand: Boolean = true
            val instructionScreen: Boolean = false
            val config = JSONObject()
            config.put(
                UIConfigurationParameters.CFC_PROCESS_INDEX_FINGER,
                if (indexCapture) "Y" else "N"
            )
            config.put(
                UIConfigurationParameters.CFC_PROCESS_MIDDLE_FINGER,
                if (middleCapture) "Y" else "N"
            )
            config.put(
                UIConfigurationParameters.CFC_PROCESS_RING_FINGER,
                if (ringCapture) "Y" else "N"
            )
            config.put(
                UIConfigurationParameters.CFC_PROCESS_BABY_FINGER,
                if (babyCapture) "Y" else "N"
            )
            config.put(
                UIConfigurationParameters.CFC_CAPTURE_LEFT_HAND,
                if (captureLeftHand) "Y" else "N"
            )

            config.put(
                UIConfigurationParameters.CFC_KEEP_INDEX_FINGER,
                if (dIndexKeep) "Y" else "N"
            )
            config.put(
                UIConfigurationParameters.CFC_KEEP_MIDDLE_FINGER,
                if (dMiddleKeep) "Y" else "N"
            )
            config.put(
                UIConfigurationParameters.CFC_KEEP_RING_FINGER,
                if (dRingKeep) "Y" else "N"
            )
            config.put(
                UIConfigurationParameters.CFC_KEEP_BABY_FINGER,
                if (dBabyKeep) "Y" else "N"
            )

            config.put(
                UIConfigurationParameters.CFC_SHOW_INSTRUCTION_SCREEN,
                if (instructionScreen == true) "Y" else "N"
            )
            //set language for sdk capture
            FingerPrintCaptureSDK.setLanguage(LanguageUtils.LANGUAGE.ES.toString())
            
            FingerPrintCaptureSDK.captureFourFingerprint(this@IDCaptureActivity,
                config
            ) { resultMap, response -> //set 4fingerPrintData in to the sdk 2.0
                IdentityProofingSDK.set4FingerPrintData(resultMap)
            }
        }

    

Custom Camera Fingerprint Capture Configurations

Camera fingerprint capture config Description
cfc_label_text_typeface_type

Following values are supported for label typeface.

DEFAULT, DEFAULT_BOLD, SANS_SARIF, SERIF, MONOSPACE

cfc_label_text_typeface_style

Following values are supported for label typeface style.

NORMAL, BOLD, ITALIC, BOLD_ITALIC

cfc_label_text_color

cfc_label_text_color_alpha

Color and Transparency of label text on instruction screen.

cfc_instruction_button_color

cfc_instruction_button_alpha

Color and Transparency of instruction screen continue button.

cfc_instruction_button_txt_color

cfc_instruction_button_txt_alpha

Color and Transparency of instruction screen continue button text.
id_enable_label_shadow Enable/Disable label shadow

id_capture_button_color

id_capture_button_alpha

Color and Transparency of ID capture button.
labels

Currently following labels are shown on FingerPrint Capture screen, that can be customized with your own custom message.

camera_finger_capture_title
move_closer
move_away
incorrect_hand
hold_steady
capturing_detail
finger_too_close
finger_too_far

Additional functions are also detailed in the SDK Documentation
Note: When using the IDentity SDK, you do not need to create a request for XML; it is automatically generated by the SDK based on the function that you are calling

Parameters Used-

SDK initialization-
  • [initializeApiBaseUrl] - Base url provided by Idmission to initialize the SDK.
  • [apiBaseUrl] - Base url provided by Ismission for API calls.
  • [loginId] - LoginId provided by Idmission.
  • [password] - Password you have created with loginId.
  • [merchantId] - MerchantId provided by idmission.
  • [enableDebug] - (Boolean) If you want to enable debug options or not.
  • [enableGPS] - (Boolean) If you want to enable GPS options or not.
  • [sdkCustomizationOptions] - SDKCustomizationOptions options if you want to add your customized UI details.
Service Enroll Call
  • [UniqueNumber] - Unique Number required.
SDK UI Customization Options-
  • You can add your own customised ui details for ID and Face in Instruction, Capture and Retry screen by adding SDKCustomizationOptions in initialization or service call. You can refer below example:

    private fun getSdkCustomOptimization(): SDKCustomizationOptions {
        return SDKCustomizationOptions(
            language = LANGUAGE
                .valueOf(language!!),
            
            
            /* For Document related customizations */
            idCaptureCustomizationOptions = IDCaptureCustomizationOptions(
                enableIdInstructionScreen = true,
                stringOptions = IDStringOptions(
                    captureScreenFrontIDLabel = "Scan the Front of your ID",
                    captureScreenBackIDLabel = "SCAN the Back of your ID",
                    captureScreenBarcodeLabel ="Scan the Barcode on the Back of your ID ",
                    captureScreenDocumentCaptureLabel = "Frame Your Document.",
                    captureScreenError = "Sorry, we can\'t seem to find a face and/or required text on this ID.",
                    captureScreenBarcodeError = "Sorry, we can\'t seem to detect the barcode in this image.",
                    moveCloser = "Move ID Closer",
                    moveAway = "Move ID Away",
                    alignRectangle = "Align Document Inside Rectangle",
                    useFront = "Use Front of ID",
                    useBack = "Use Back of ID",
                    makeSurePhotoTextVisible = "Make sure all text on the ID is completely visible.",
                    scanBarcode = "Scan Barcode",
                    makeSureBarcodeVisible = "Make sure the barcode on the ID is completely visible.",
                    frontBackMismatch = "ID Front and Back Do Not Match",
                    flipToBack = "Flip to Capture ID Back",
                    tooMuchGlare = "Too much light,\n move document away from direct light",
                    tooMuchDark = "It\'s too dark to take a good image. Find a place with better lighting.",
                    retryScreenLabelText = "Real ID not detected. Please try again.",
                    retryButtonText = "Retry",
                    cancelButtonText = "Cancel",
                    idInstructionText = "Scan ID",
                    documentInstructionText = "Scan ID",
                    cancelText = "Cancel"
                    
                ),
                layoutOptions = IDLayoutOptions(
                captureLabelGravity = LabelGravity.CENTER,
                topBarCancelButtonGravity = CancelButtonGravity.START),
                colorOptions = IDColorOptions(
                    captureBackgroundColor = "#1C2B48",
                    captureLabelColor = "#FFFFFF",
                    captureSuccessLabelTextColor = "#FFFFFF",
                    
                    captureErrorLabelTextColor = "#1C2B48",
                    captureErrorLabelBackgroundColor = "#FFFFFF",
                    captureErrorLabelBackgroundColor = "#FFFFFF"
                    instructionScreenBackgroundColor = "#1C2B48",
                    instructionScreenLabelTextColor = "#FFFFFF",
                    instructionScreenButtonBackgroundColor = "#FFFFFF",
                    instructionScreenButtonTextColor = "#000000",
                    retryScreenBackgroundColor = "#1C2B48",
                    retryScreenLabelTextColor = "#FFFFFF",
                    retryScreenButtonTextColor = "#000000",
                    retryScreenButtonBackgroundColor = "#FFFFFF",
                    retryScreenImageTintColor = "#FFFFFF",
                    topBarBackgroundColor = "#FFFFFF",
                    topBarTitleTextColor = "#000000"
                ),
                fontOptions = IDFontOptions(
                    labelFont = R.font.roboto_medium,
                    labelFontSize = 14,
                    labelPromptFontSize = 14,
                    instructionScreenButtonFont = R.font.roboto_medium,
                    instructionScreenLabelFont = R.font.roboto_medium,
                    retryScreenLabelFont = R.font.roboto_medium,
                    retryScreenButtonFont = R.font.roboto_medium
                )
            ),

            
            /* For Selfie related customizations */
            selfieCaptureCustomizationOptions = SelfieCaptureCustomizationOptions(
                enableSelfieInstructionScreen = true,
                stringOptions = SelfieStringOptions(
                
                 captureScreenLabel = "Frame your face inside the oval.",
                captureScreenError = "Sorry, we can\'t seem to detect a face.",
                moveCloser = "Move Closer",
                moveAway = "Move Further",
                alignInsideOval = "Align Face Inside Oval",
                capturingFace = "Capturing Face",
                realFace = "Real Face",
                leftEyeClosed = "Left Eye Closed",
                rightEyeClosed = "Right Eye Closed",
                faceMaskDetected = "Face Mask Detected",
                tooMuchLight = "Excessive backlighting detected. Please reduce backlighting to proceed.",
                tooDark = "Excessive darkness detected. Please reduce darkness to proceed.",
                straightenHead = "Tilt head upright",
                eyesClosed = "Keep eyes open",
                moveFaceDown = "Move Face Down",
                moveFaceUp = "Move Face Up",
                glassesDetected = "Remove Glasses",
                hatDetected = "Hat detected",
                scarfDetected = "Scarf Detected",
                scarfHatDetected = "Scarf and Hat detected",
                glassesHatDetected = "Glasses and Hat detected",
                scarfGlassesDetected = "Scarf and Glasses detected",
                maskDetected = "Mask detected",
                maskHatDetected = "Mask and Hat detected",
                scarfMaskDetected = "Scarf and Mask detected",
                maskGlassesDetected = "Mask and Glasses detected",
                fakeFace = "Fake Face",
                retryScreenLabelText = "Live face not detected. Please try again.",
                retryButtonText = "Retry",
                cancelButtonText = "Cancel",
                selfieInstructionText = "Scan selfie",
                cancelText = "Cancel",
                ),
                layoutOptions = SelfieLayoutOptions(
                captureLabelGravity = LabelGravity.CENTER,
                topBarCancelButtonGravity = CancelButtonGravity.START),
                colorOptions = SelfieColorOptions(
                    captureBackgroundColor = "#1C2B48",
                    captureLabelColor = "#FFFFFF",
                    captureSuccessLabelTextColor = "#FFFFFF"
                    captureErrorLabelTextColor = "#1C2B48",
                    captureErrorLabelBackgroundColor = "#FFFFFF",
                    captureErrorLabelBackgroundColor = "#FFFFFF"
                    instructionScreenBackgroundColor = "#1C2B48",
                    instructionScreenLabelTextColor = "#FFFFFF",
                    instructionScreenButtonBackgroundColor = "#FFFFFF",
                    instructionScreenButtonTextColor = "#000000",
                    retryScreenBackgroundColor = "#1C2B48",
                    retryScreenLabelTextColor = "#FFFFFF",
                    retryScreenButtonTextColor = "#000000",
                    retryScreenButtonBackgroundColor = "#FFFFFF",
                    retryScreenImageTintColor = "#FFFFFF",
                    topBarBackgroundColor = "#FFFFFF",
                    topBarTitleTextColor = "#000000",
                ),
                fontOptions = SelfieFontOptions(
                    labelFont = R.font.roboto_medium,
                    labelFontSize = 14,
                    labelPromptFontSize = 14,
                    instructionScreenButtonFont = R.font.roboto_medium,
                    instructionScreenLabelFont = R.font.roboto_medium,
                    retryScreenLabelFont = R.font.roboto_medium,
                    retryScreenButtonFont = R.font.roboto_medium

                )
            )
        )
    }


Setting an on cancelled callback

See the code snippet below for how to specify a callback function to be triggered when cancelling/backing out of an SDK operation:

IdentityProofingSDK.setOnCancelled(fun() { print("Cancelled") })

SDK documentation

You can find SDK documentation here

SDK Flavours

  • Identity SDK
  • IdentityMedium SDK
  • IdentityLite SDK
  • IdentityVideoID SDK

SDK Flavours Supported Features

Identity SDK IdentityMedium SDK IdentityLite SDK IdentityVideoID SDK
Identity SDK IdentityMedium SDK IdentityLite SDK IdentityVideoID SDK
Document Detect On Device On Device On Device On Device
Rotate, crop etc. On Device On Server On Server On Device
Document Realness On Device On Server On Server On Device
Document Classification On Device On Server On Server On Device
MRZ/Barcode reading On Device On Device On Server On Device
OCR from front On Server On Server On Server On Server
Face detect On Device On Device On Device On Device
Liveness detect On Device On Device On Device On Device
Detect hats and glasses On Device On Server On Server On Device
Video ID N/A N/A N/A On Device

SDK Version History

v9.5.9.2.05
  • UI Changes and bug Fixes for Passport NFC detection
  • Removed Firebase Analytics
  • Bug fixes and performance improvements.
v9.5.7.2.08
  • Integrate ID Chip reading ability for passport
  • Improvement for real ID detection and bug fixes.
v9.5.4.2.02
  • Fixed GTE Data upload issue for ID capture
v9.5.3.2.04
  • Updated all local models
v9.5.2.2.06
  • Updated focus model to be downloaded from server and updated
  • default focus threshold.
  • Updated UI elements to allow for customization by integrator - all UI elements are now customizable.
    • Instruction Screen button text and colors
    • Instruction text and colors
  • Enhancements added to improve handling of Video ID
v9.4.8.2.15
  • New IdentityVideoID SDK for capturing a selfie and ID to match against a previous ID validation call, and then recording a video instructing the user to speak a customizable phrase.
  • Added SignatureCapture support
  • Added FingerPrintCapture support
v9.3.10.2.9
  • Prevent two faces from being captured during selfie capture.
  • Model Decryption using latest algorithm(AES/GCM/NoPadding).
  • Handle the CAN BC DL barcode XSLT
  • Added Spanish language support
  • Now fitting instead of filling the camera preview to better support the 600px height requirement.
  • Added additional customer response data parameters; state and postalCode.
  • Updated instruction screen for IDCapture & SelfieCapture
  • Bug fixes and performance improvements.
v9.3.4.2.8
  • Additional document upload and capture feature.
  • Added customization of overlay images while capturing ID and selfie.
  • Added focus model for better image capture.
  • Bug fixes and performance improvements.
v9.3.1.7
  • Autofill.
  • Added SDK UI Customization.
  • Instruction screens for selfie and ID capture.
  • Bug fixes and performance improvements.
v9.2.3.4
  • Bug fixes and performance improvements
v9.1.7.20
  • Enrollment
  • Enrollment with Biometrics
  • Customer Verification
  • ID Validation and face match

Releases

No releases published

Packages

No packages published

Languages