Skip to main content

onfido-sdk-android

Import the SDK

For advice about which SDK version you should download, see the Requirements section.

You can use Gradle to download/upgrade Onfido's SDK version automatically, instead of manually downloading the zip file from Onfido's github page.

You can set up the download instructions like this:

build.gradle
...

repositories {
...
maven {
...
maven {
url "https://dl.bintray.com/onfido/maven"
}
}
}

...

dependencies {
...
implementation 'com.onfido.sdk.capture:onfido-capture-sdk-core:x.x.x'
}

...

If these instructions stop working (for example, if they become outdated), then you can contact us by creating a support ticket in the Signicat Dashboard.

Initialise and run the SDK (Java code example)

You must send the authorization field that you received in the backend response to the mobile app.

Sample code for starting the SDK:

OnfidoConfig config = new OnfidoConfig.Builder(activity)
.withSDKToken(authorization) //this is the authorization you received from Assure API
.withCustomFlow(steps) //these steps will have to be configured by you depending on the document you're using and the processType
.build();
Onfido onfido = OnfidoFactory.create(activity).getClient();
onfido.startActivityForResult(activity, ONFIDO_PROCESS_REQUEST_ID, config); //ONFIDO_PROCESS_REQUEST_ID is the ID that comes to the onActivityResult method.

After you have started the SDK, the SDK communicates directly with Onfido and sends the images and videos etc. Then Onfido analyses the process and you will receive a result from the SDK saying if it was a success or not. The process of the mobile app ends here.

Customisation

You can customise the SDK by following the steps described in https://github.com/onfido/onfido-android-sdk depending on the document you're using.

On this page