Android SDK
Prerequisites
Before integrating the SDK, ensure your development environment meets the following requirements:
- Android Studio version:
Narwhal - Android Minimum API Level:
26 - Android Target API Level:
36 - Gradle version:
8.14.3
Adding the SDK to Your Project
Required App Integration Steps
Our SDK will automatically request the permissions that it needs. If your application explicitly removes permissions, please ensure that CAMERA and RECORD_AUDIO are not removed.
Our SDK automatically requests and uses FOREGROUND_SERVICE_DATA_SYNC. You must declare the foreground service information within the Play Console (it is located under Policy -> App Content -> Foreground Service Permissions). Please follow the instructions outlined by Google Play here to ensure your application is compliant. These steps are:
- Provide a description of the app functionality that is using each foreground service type. You may supply the following description: “Our application uses the foreground service to upload end-user data to our servers for verification purposes”.
- Describe the user impact if the task is deferred by the system (does not start immediately) or the task is interrupted by the system (paused or restarted). You may supply the following description: “If the task is deferred or interrupted by the system, the end-user verification will be delayed”.
- Include a link to a video demonstrating each foreground service feature. You may record a video of the verification flow and provide a link to this video.
- Choose your specific use case for each foreground service type. You may select the following use case: “Network Transfer: Upload or Download / Other”.
Initialization
To initialize the SDK, create a subclass of the Application class, and add the following code to your onCreate() method:
You will need to pass in an instance of IDMeSDKConfig while initializing the SDK. This example demonstrates how to create this config:
The tokenProvider in the example is responsible for generating the client access token. This token enables the SDK to make REST API requests to ID.me’s backend APIs. The application must obtain a client access token from ID.me and provide a function to generate a new token if the current one expires. The SDK will then automatically use this to make REST API requests. This example illustrates the signature of this token provider method:
Common Usage Patterns
This section provides examples of common tasks you can perform with our Mobile SDK.
Performing Legal Document Verification
This section details the process of legal document verification utilizing our Mobile SDK. Initiating a verification is straightforward, as demonstrated by the code snippets below.
Once the verification is complete, you will receive a result, which contains the following fields:
Checking the Status of an Ongoing Verification
This section describes how to obtain the status of an ongoing verification.
Customizing the Document Scanner User Interface
This section details how to customize the document scanner’s user interface. While default values are based on ID.me’s design system, you have the flexibility to replace any or all of these to align with your application’s aesthetic. We provide customization options for the following elements:
- Colors: Modify the color scheme of various interface elements.
- Button Radius: Control the roundness of buttons within the Mobile SDK.
- Logo: Replace the default ID.me logo with your application’s logo.
- Fonts: Choose the fonts used for all text displayed in the document scanner interface.
Support
If you encounter any issues or have questions, please contact our developer support team. You can reach us at mobile-sdk-issues@id.me.