Android installation

Follow the instructions below to install the SDK

License authorization

Install our Android Demo, follow the prompt to enter the activation code to authorize the device, and if the activation is not successful, check according to the error code returned.

Demo source code compile and run

We have integrated the model, jni library(libdfacepro.so) and java api(dface.jar) into the demo project, so we can directly open the example/android/dfaceCameraDemo project with android studio to compile and run. Because the Gradle network synchronizes the local library, it will be slower to open for the first time.

Note

  • We put the model in the app/src/main/assets/model directory, and the demo will automatically copy the model file to the /dface directory of the sd card when init start.

  • Demo local database using sqllite, /dface/db/demo.db on sd card.

  • The JNI library(libdfacepro.so) is placed under app/src/main/jniLibs/armeabi-v7a(arm64-v8a)

  • The JAVA API(dface.jar) package is placed under the app/libs directory

Upgrade and migration

  • Replace app/src/main/assets/model directory

  • Replace app/src/main/jniLibs/armeabi-v7a(arm64-v8a) directory

  • Replace app/lib/dface.jar

  • load dface JNI library

static {
    System.loadLibrary("dfacepro");
}