Usage
Minimum Requirements
API Level for use is 21 (Android 5.0)
Java 7
Access to storage and camera
AndroidX
Installation
Add the following lines of code to your project-level gradle to your repositories
Add the following lines of code to your app-level gradle to your dependencies
Latest version Version 2.2.2
Authentication
In order to generate an access token that will be used in the SDK authentication settings, use our authentication service API.
Configuration
Declare the following Valify variables
Initialize your SDK in your activity or fragment as follows:
Configure your SDK settings:
If you don’t specify any services, the following services will be set by default to “True” and the user will go through the complete eKYC process:
If you use the Face Match service after the OCR or OCR w/ Verification service then the face in the front side image of the national ID captured during the OCR or OCR w/ Verification step will be used for comparison with the image captured during the Face Match step.
If you use the Face Match service separately, you need to either pass an image or a transactions id for a hit previously made to our OCR or OCR w/ Verification service for comparison with the image that will be captured for the user going through the SDK experience:
Depending on the image size, compress as follows:
The default language of the SDK is English, to set it to Arabic add the following:
To add your custom logo to the splash screen:
Specify the number of instructions, length of each instruction, and the number of maximum number of trials for the liveness service as follows:
Remove the actions you do not want the user to perform for the liveness service as follows:
Start the Valify Service:
Your activity should implement onActivityResult
in order to receive the data collected from the process similar to the following example:
In this callback, we call the method handleActivityResult
from the Valify object which overrides onSuccess, onExit & onError:
OnSuccess is only called when the user has completed the experience successfully. The Valify token (
valifyToken
), and the data collected (valifyData
) are returned.OnExit is only called when the user exits the SDK voluntarily returning to the main app. The Valify token (
valifyToken
), step at which the user exited (step
), and the data collected before exiting (valifyData
) are returned to the app.OnError is only called when the user aborts as a result of an error. The Valify token (
valifyToken
), error code (errorCode
), step at which the user exited (step), and the data collected before the error occurred (valifyData
) are returned to the app.
Last updated