Skip to content

Android

How to install the Regula Face SDK.

Requirements

The minimum Android API level is 21.

Installation

The Face SDK for Android is available on Maven and can be included via Gradle. Note that the SDK includes the essential Core framework that should be added to all projects.

  1. Add the Regula Maven repository to your settings.gradle:
    dependencyResolutionManagement {
        repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
        repositories {
            google()
            mavenCentral()
    
            maven {
                url "https://maven.regulaforensics.com/RegulaDocumentReader"
            }
        }
    }
    
  2. Then add the SDK as a dependency to your app-level build.gradle. Make sure transitive is set to true:
    dependencies {
        implementation ('com.regula.face:api:+@aar') {
            transitive = true
        }
        implementation ('com.regula.face:core:+@aar')
    }
    

Manual Integration

1. Go to our Maven repository.

2. Download the latest Face API version.

3. Find the .pom file there, open it, and check the version of the Common API.

4. Download that Common API version.

5. Download the latest Core version.

6. Copy the downloaded files to the libs folder located at the root directory of your project. If there is no such a folder, create it.

7. Add the libs directory to the settings.gradle:

settings.gradle
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
dependencyResolutionManagement {
    repositoriesMode.set(RepositoriesMode.PREFER_SETTINGS)
    repositories {
        google()
        mavenCentral()
        jcenter()
        flatDir {
            dirs 'libs'
        }
    }
}

8. Add the downloaded files to the app level build.gradle file of your project, for example:

build.gradle
1
2
3
4
5
dependencies {
    implementation(name:'api-5.1.2371', ext:'aar')  // face api
    implementation(name:'api-6.7.1187', ext:'aar')  // common
    implementation(name:'fcore-5.1.165', ext:'aar')
}

9. Sync the project.