---
updatedAt: 2026-11-02T14:40:17.000Z
agentTools:
  projectIndex: https://docs.fourthline.com/llms.txt
---

# Android SDK

Integration Options

This page sets out step-by-step instructions for setting up your [App Drop-in](https://docs.fourthline.com/v2.0/docs/app-drop-in) via the Android SDK.

## Prerequisites

* You need your [API credential set](https://docs.fourthline.com/v2.0/docs/api-credentials).
* Provide your Fourthline delivery manager with the GitHub usernames and email addresses of your staff who need access to our repositories.

Operating system specifications:

* Minimum API version: 24 (Android 7.0)
* Minimum API version for [eID Verification](https://docs.fourthline.com/v2.0/docs/eid-overview): 28 (Android 9.0)
* Language: The SDK is written in Kotlin but is also compatible with Java.

Device specifications:

* Any device running the minimum supported OS version with a functioning camera is supported. For optimal performance, we recommend using a device capable of capturing high-quality images.

***

## Configuration

### Age requirement

<img src="https://files.readme.io/5c5228a-Inline_Configurable.svg" alt="Configurable" align="left" /> **Configurable**

You can dynamically configure the minimum client age requirement and the related checks during Identity Verification workflows.

### Document data

<img src="https://files.readme.io/5c5228a-Inline_Configurable.svg" alt="Configurable" align="left" /> **Configurable** <br />

Discuss with your Fourthline delivery manager what data to extract from ID document photos via optical character recognition (<Glossary>OCR</Glossary>):

| Data type                  | Description                                                                                                                                                     |
| :------------------------- | :-------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| MRZ data                   | Document data is extracted from the <Glossary>MRZ</Glossary> **only** and is processed offline by the SDK.                                                      |
| MRZ **and** <br />VIZ data | For greater accuracy, document data is extracted from the <Glossary>MRZ</Glossary> **and** <Glossary>VIZ</Glossary> and processed by our AI agent in real time. |

### Identity data

<img src="https://files.readme.io/5c5228a-Inline_Configurable.svg" alt="Configurable" align="left" /> **Configurable**

If you want to receive a copy of the identity data gathered by the App Drop-in when it's uploaded to our backend (**before** case processing), let your Fourthline delivery manager know.

### Real-time feedback

<img src="https://files.readme.io/5c5228a-Inline_Configurable.svg" alt="Configurable" align="left" /> **Configurable**

Agree with your Fourthline delivery manager whether you want to enable real-time feedback. The SDKs send the document photos to our backend as soon as they are captured, where we assess the image quality and provide the client feedback in the UI in real time. This ensures higher-quality photos are ultimately uploaded, reduces <Glossary>sendback</Glossary>, and improves user experience.

### Supported devices

> **Support**
>
> For questions about supported devices, contact your Fourthline delivery manager.

***

## Identity Verification

### Setup

You can add the SDK to your project using Gradle.

**1.** In your **top-level** `build.gradle` file, link to Fourthline's repository:

```groovy Gradle
allprojects {
 repositories {
 //...
 maven {
 url "https://maven.pkg.github.com/Fourthline-com/FourthlineSDK-Android"
 credentials {
 username ""
 password getLocalProperty("github_token")
 }
 }
 }
}
```
```kotlin Gradle KTS
allprojects {
 repositories {
 //...
 maven {
 url = URI("https://maven.pkg.github.com/Fourthline-com/FourthlineSDK-Android")
 credentials {
 username = ""
 password = getLocalProperty("github_token")
 }
 }
 }
}
```

**2.** To access Fourthline's repository, in your GitHub account, go to **Settings** > **Account security** > **Enable two-factor authentication**.

**3.** Go to **Settings** > **Developer settings** > **Personal access tokens** > **Generate a new token**.

**4.** Select the scope "read:packages", and then generate a new token.

**5.** Store the access token in a secure, but accessible location, e.g. `local.properties`.

> **Tip**
>
> Treat the token as a password. **Don't** store it in your version control system. If you need to share it, use a password manager.

Example code for `local.properties`:

```groovy
//..
github_token=YOUR_ACCESS_TOKEN
```

**6.** In your **module-level** `build.gradle` file, add a dependency to the Fourthline SDK:

```groovy Gradle
dependencies {
 // ...
 def fourthlineSdkVersion = "%%LATEST_SDK_VERSION%%"
 implementation "com.fourthline:fourthline-sdk:$fourthlineSdkVersion"
}
```
```kotlin Gradle KTS
dependencies {
 // ...
 val fourthlineSdkVersion = "%%LATEST_SDK_VERSION%%"
 implementation("com.fourthline:fourthline-sdk:$fourthlineSdkVersion")
}
```

### Error handling

You need to handle the following error values:

| Name                        | Description                                                                                                                       |
| :-------------------------- | :-------------------------------------------------------------------------------------------------------------------------------- |
| `Canceled`                  | The client canceled the workflow.                                                                                                 |
| `ClientRejected`            | The client **isn't** eligible for the Identity Verification workflow. <br />You **cannot** retry.                                 |
| `ConfigurationNotSupported` | The workflow created with the validation code **isn't** supported. <br />**Action**: Consider updating to the latest SDK version. |
| `InvalidValidationCode`     | The validation code for the SDK session is invalid. <br />**Action**: [Get a new validation code](https://docs.fourthline.com/reference/create-sdk-session).        |
| `InvalidWorkflowStatus`     | The status of the workflow is invalid, e.g. because the modules were completed successfully or with an error.                     |
| `ModuleError`               | The client encountered an error in a workflow module.                                                                             |
|                             | **Identity Verification**                                                                                                         |
|                             | • `PersonNotAdult`: The client is underage.                                                                                       |
|                             | • `NationalityNotSupported`: The client's nationality **isn't** supported.                                                        |
|                             | • `IssuingCountryNotSupported`: The ID document issuing country **isn't** supported.                                              |
|                             | • `DocumentExpired`: The ID document has expired.                                                                                 |
|                             | • `DocumentTypeNotSupported`: The ID document type **isn't** supported.                                                           |
|                             | **Bank Account Verification**                                                                                                     |
|                             | • `Failed`: An unexpected generic error occurred.                                                                                 |
|                             | • `KycRequired`: The client must first pass Identity Verification.                                                                |
|                             | **Qualified Electronic Signature**                                                                                                |
|                             | • `TooManyResendOtpAttempts`: The one-time passcode was resent to the client too many times.                                      |
|                             | • `TooManyAuthorizationAttempts`: The client tried to approve the documents to sign too many times.                               |
|                             | • `KycRequired`: The client must first pass Identity Verification.                                                                |
| `Unexpected`                | An unexpected error occurred. <br />**Action**: Contact your Fourthline delivery manager immediately.                             |

### Testing

To view a mock version, launch the various modules using the following mock validation codes:

| Product                               | Mock validation code                                                       |
| :------------------------------------ | :------------------------------------------------------------------------- |
| Identity Verification                 | `IDV`                                                                      |
| Qualified Electronic Signature module | `QES`                                                                      |
| Bank Account Verification module      | `BAV`                                                                      |
| Combinations                          | `IDVandBAV`<br />`IDVandQES`<br />`IDVandBAVandQES`<br />`IDVandQESandBAV` |

Example code:

```javascript Android
val validationCode: String
val config = WorkflowConfig(networkEnvironment = Mock)

Orca.workflow(context, validationCode)
 .configure(config)
 .present { result -> }
```

***

## Bank Account Verification

If your workflow includes [Bank Account Verification](https://docs.fourthline.com/v2.0/docs/bav-overview), this module redirects to the [Web SDK](https://docs.fourthline.com/v2.0/docs/web-sdk).

To redirect the client back to your app after completing the module in the web browser, you need to register a URL scheme.

For instructions, see Apple – [Register your URL scheme](https://developer.apple.com/documentation/xcode/defining-a-custom-url-scheme-for-your-app#Register-your-URL-scheme).

***

## Analytics

The `FourthlineCore` module collects and processes Android SDK metrics. To learn more, contact your customer success manager.

***

## Data delegate

To receive notifications for each data group that the SDK uploads to Fourthline and a copy of the data itself, add a data delegate:

```javascript
import com.fourthline.orca.Orca
import com.fourthline.orca.workflow.WorkflowResults.*
import com.fourthline.orca.workflow.workflow

Orca.workflow(context, validationCode)
  .configure(config)
  .customize(customisationConfig)
  .addDelegate { results ->
    when(results){
      is IDV.Address -> TODO()
      is IDV.DeviceMetadata -> TODO()
      is IDV.Document -> TODO()
      is IDV.DocumentVideo -> TODO()
      is IDV.Nfc -> TODO()
      is IDV.Person -> TODO()
      is IDV.Selfie -> TODO()
      is IDV.SelfieVideo -> TODO()
    }
  }
  .present { result -> }
```

***

## Temporary files

The SDK stores some data collected during workflows (e.g. selfie and document videos) in the `tmp/fourthline` folder in the client's device filesystem. This is because the videos must remain available until collected, packaged into a zipfile, and uploaded to our backend.

**You** must delete the temporary files when they are no longer needed, e.g. after the SDK has uploaded all data to Fourthline **or** immediately before the app is terminated in `onDestroy()`.

```javascript Kotlin
context.deleteFourthlineFiles()
```
```javascript Java
FourthlineFileManager.deleteFourthlineFiles(context);
```

# Sibling pages

* [iOS SDK](https://docs.fourthline.com/docs/app-drop-in-setup-ios.md)
* [Cross-platform integration](https://docs.fourthline.com/docs/cross-platform-integration.md)

# Related pages

* [App Drop-in](https://docs.fourthline.com/docs/app-drop-in.md)