Android
This is a walkthrough of how you can integrate the Onboarding or Authenticate SDK for Android applications.
Getting started
In order to perform an Onboarding or an Authenticate, you should follow those steps:
Set up the SDK: install and import the SDK.
Get a token: request a token using your business credentials.
Start an onboarding or authenticate flow: launch a user workflow.
Get the user workflow result from SDK: use the Message handler to get insights about the user workflow.
Get the Analysis result: use your callback or the endpoint to get the analysis result.
1. Set up the SDK
1.1 Project requirements
The SDK supports API level 24 and above (distribution stats).
Our configuration is currently set to the following:
minSdkVersion = 24
targetSdkVersion = 34
android.useAndroidX=true
For Kotlin
1.2 Proguard Rules
1.3 Add repository
Add the repository URL to the project-level build.gradle:
1.4 Add library dependency
Add the library dependency to the app module’s build.gradle:
1.5 Sync the Project
After you’ve added the repository and dependency, sync the Gradle project by clicking on the “Sync Now” notification in Android Studio or manually triggering a sync via File > Sync Project with Gradle Files.
2. Get a token
Use the credentials you recieved from ShareID's team to get an authentcation token and launch an onboarding or authenticate workflow.
Depending on the SDK you are integrating (Onboarding/Authenticate), you may use an API here Get a Token
3. Start an onboarding or authenticate flow
Use your token to start ShareIdMainActivity and action ShareIdMainActivity.SHARE_ID_METHOD
Use the value ShareIdMainActivity.SHARE_ID_ONBOARDING for Onboarding and ShareIdMainActivity.SHARE_ID_AUTHENTICATE for Authenticaticate.
Below a Kotlin
example:
The table below describes the list of parameters:
4. Get the user workflow result from SDK
In order to retrieve ShareID results from the flow, customize the method onActivityResult on your activity/fragment. You will also need to implement the interface ShareIdResultListener:
When the user will successfully complete the flow and the captured videos will be uploaded, the success
method will be invoked.
The ShareIdResult
contain the error description and does not contain any information about the document nor the user captured during the acquisition phase.
To view all possible end-of-process results in our SDK, please refer to the Message Handler for all success, exit and failure states.
5. Get the Analysis result
When the processing of an onboarding request is finished, you may receive the result through the callback if you provided it. You may also, fetch yourself the result by calling our API.
See Get the analysis result for more details.
Customisation
ShareID's Android SDK has been designed to enable customization during integration.
Text content
To change the text content, add a values-XX
file to your application and use the same keys as ShareID so that they are overwritten by your text.
Languages supported:
🇸🇦 (ar), 🇩🇪 (de), 🇬🇧 (en), 🇪🇸 (es), 🇫🇷 (fr), 🇮🇹 (it), 🇵🇹 (pt), 🇷🇴 (ro), 🇷🇺 (ru)
[!info] Important
Be sure to add
values-XX
to your res folder with all the languages you want to support in your application. (This enables RTL navigation)XX means the language code. Ex: ar or en or fr ...
Technical support and contact 💬
Last updated