Android
This is an Android-specific Face SDK installation guide. Before proceeding further, make sure you've read the Installation page and have selected the Core type to install.
Requirements
- The minimum Android API level is 21
Installation
Gradle
The Face SDK for Android is available on Maven and can be included via Gradle.
1. Add the Regula Maven repository to your settings.gradle
file:
settings.gradle | |
---|---|
1 2 3 4 5 6 7 8 9 10 11 |
|
settings.gradle.kts | |
---|---|
1 2 3 4 5 6 7 8 9 |
|
2. Add the SDK as a dependency to your app-level build.gradle
. Make sure transitive
is set to true
.
- Core Basic
build.gradle | |
---|---|
1 2 3 4 5 6 |
|
build.gradle.kts | |
---|---|
1 2 3 4 5 6 |
|
- Core Match
build.gradle | |
---|---|
1 2 3 4 5 6 |
|
build.gradle.kts | |
---|---|
1 2 3 4 5 6 |
|
3. To use Core Match, it's necessary to include the uncompressed faceSdkResource.dat
file in the APK. When integrating the Face SDK into a multi-module project, remember to add the code snippet to the android
section at the end of the app's Gradle file, rather than within the module itself. If you use Core Basic, skip this step.
Simply add the following code to the android
section in the app/build.gradle
file:
build.gradle | |
---|---|
1 2 3 4 5 6 7 8 9 |
|
build.gradle.kts | |
---|---|
1 2 3 4 5 6 7 8 9 |
|
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. Get 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
file:
settings.gradle | |
---|---|
1 2 3 4 5 6 7 8 9 10 |
|
settings.gradle.kts | |
---|---|
1 2 3 4 5 6 7 8 9 10 11 |
|
8. Add the downloaded files to the app level build.gradle
file of your project, for example:
build.gradle | |
---|---|
1 2 3 4 5 |
|
build.gradle.kts | |
---|---|
1 2 3 |
|
9. Sync the project.