This article explains how to build "facecompare" sample app which is included in ESDK for Android package.

If you unpack the ESDK package downloaded from SAFR product portal, you will get following folders under the package directory.

docs  include  lib  model  samples  samples_java_android

Set up the project directories and files

You can find "facecompare" in samples_java_android.

cd samples_java_android\facecompare

Create following directories under facecompare directory.


    |--- include

    |--- model 

    |--- lib 

        |--- arm64-v8a    : for arm64-v8a architecture

        |--- armeabi-v7a  : for armeabi-v7a architecture

Copy include and model files from the ESDK root directories.

cd esdk_distribution
copy ..\..\..\include\* include\
copy ..\..\..\model\* model\

Copy lib files to appropriate path depends on the target architecture.

copy ..\..\..\lib\* lib\arm64-v8a\
copy ..\..\..\lib\* lib\armeabi-v7a\

Import project into Android Studio

Launch Android Studio, and Open $ESDK_ROOT\samples_java_android\facecompare\source 


Select File > New > Import Project menu.  Select $ESDK_ROOT\samples_java_android\facecompare\source

if you are already open other project.

Wait until Gradle resolves dependencies.

Install ESDK Developer Key

You need to setup ESDK Developer Key to run ESDK application, including the sample App.

If you haven't have the Developer Key yet, go to SAFR Product Portal > Developer page, and click "Request new key" link under SAFR ESDK.

Set the key string to LICENSE variable in

private static final String LICENSE = "OBTAIN_FROM_RN"; 

If needed, update LIB_VERSION inside the app/src/main/cpp/CMakeLists.txt file:

set(LIB_VERSION 3) # It must match to libArgusKit's version number i.e. version is 3