Android
This is a walkthrough of how you can integrate the Onboarding or Authenticate SDK for Android/Kotlin applications.
Latest version: 2.3.36
Only for versions higher than 1.0.8
Versions after 1.0.8 bring significant enhancements to improve performance and ensure consistency between development environments. Although we have kept client-side changes to a minimum, we recommend that you consult the updated integration guide to make full use of the SDK's capabilities.
To support backward compatibility and ease migration, the “Old version” section offers references to help adapt your current integration.
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 proper functioning of the SDK necessitates the provision of several parameters. These parameters are essential for enabling the full range of functionalities offered by the SDK.
minSdk or minSdkVersion = 24
1.2. Install SDK
ShareID use Maven to provide its SDK securely with authentication managed directly in dependencyResolutionManagement
into your settings.gradle
file.
1.3. Add the dependency
To install the SDK, you'll need to add the dependency in your app
module.
Add the following to your
build.gradle
You can now synchronise and use the SDK in your project
Make sure you update your various dependencies, distributionUrl, IDE, gradle version or anything else.
2. Get a token
Use the credentials you received from ShareID's team to get an authentication 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
Once you have added the SDK as a dependency and have your credentials, you can configure the SDK.
Kotlin
Java
The service
specifies the service in the SDK:
onboarding
starts the onboarding processauthenticate
starts the authenticate process
The initial SDK screen is automatically triggered upon execution of the method above.
But there is a third parameter for defining a context
in the event that it cannot be retrieved.
4. Get the user workflow result from SDK
To receive feedback from the SDK, you need to implement the messageHandler
closure, which manages various responses from the ShareID process.
This closure is triggered when the ShareID SDK completes an operation, fails, or encounters an error.
Kotlin
Java
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 or authenticate 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
The ShareID Android SDK is built to be highly customisable, allowing for flexibility through various configuration options or by applying themes to adapt the user interface to your needs.
Configuration
To customise the SDK, pass a ShareID.Theme
after building the flow.
Kotlin
Java
Set the colors
Kotlin
Java
Name
Message
Color
primary
The main color
ShareID blue (if nothing defined)
secondary
The main text color
Black or White (depending on your light/dark theme and if nothing is set)
Once you've assigned colors, light/dark mode management is no longer supported.
Localisation
To customise the text displayed by the ShareID SDK, you can provide your own translations by following these steps:
Right-click on your
res
folder > New > Android Resource File > name itstrings.xml
Add this file for each language you wish to customise with the same keys as those defined by ShareID to replace the SDK default values (see the localisation keys)
Example:
Languages supported:
🇸🇦 (ar), 🇩🇪 (de), 🇬🇧 (en), 🇪🇸 (es), 🇫🇷 (fr), 🇮🇹 (it), 🇵🇱 (pl), 🇵🇹 (pt), 🇷🇴 (ro), 🇷🇺 (ru)
FAQ
Technical support and contact 💬
Last updated