Visage Tracker Demo sample project
This sample application demonstrates facial features tracking on multiple faces from camera or image file and liveness verification. Currently, tracking is limited to 4 faces, although this can be modified.
Full source code of this sample is located in Samples/Android/VisageTrackerDemo.
The application needs to be rebuilt with license key in order to work properly. More information on how to obtain license key and include it in the application can be found in Licensing section of the documentation.
Using the sample application
To try the Visage Tracker Demo application, you need to transfer and install application on your Android device. First, connect your phone as a storage device and transfer the apk file onto SD card. Then, use file explorer on the Android device to locate and install the sample application. If you are not able to install the application, the following steps might be required (depending on your Android version):
- In security settings of your device, go to Install unknown apps, select the app which is used as file explorer and enable Allow from this source
- In security settings of your device, enable Unknown sources
- Go to Play Store -> Play Protect end disable option Scan device for security threats
After the installation is finished you can run the application on the device.
The sample application consists of a menu where you can choose to track from an Image or from Camera or perform liveness verification.
In case of image tracking you will be prompted to choose the image.
Figure 1.1: Application started
In case of camera tracking, tracking starts automatically when the face is detected in the camera image.

Figure 1.2: Application is tracking
In case of liveness you will be prompted to perform a set of facial motions in order to verify liveness.
Building the sample project
The VisageTrackerDemo sample project is located in the VisageTrackerDemo subfolder of the visage|
SDK for Android folder.
Prerequisites for building and running the sample project are:
- Java JDK (version 17 or higher)
- Android Studio 2025
- Android SDK 33 (minimum API level 23)
- Android NDK (r28)
- Android device with Android 6.0 or higher
Sample applications were built and tested using:
- Java JDK version 17
- Android Studio 2025.1.2
- Android SDK 33 (minimum API level 23)
- Android NDK (r28)
- Android Gradle Plugin 8.5.2
- Android Gradle 8.7
- Android device with Android 16.0
- Android device with Android 12.0
Project is opened by choosing "Open an existing Android Studio project" after running Android Studio. Sample is located in "visageSDK-Android/Samples/Android". After that the following steps are necessary:
- To compile the native code, go to Build -> Make Project
- Now the application can be built by pressing the run button and choosing your Android device
Implementation overview
The visage|SDK API is written in C++. Since development on Android is done in Java, this sample uses the AndroidWrapper C++ class that exposes Java methods for using tracking and liveness API, while the implementation of those methods is done in C++.
The AndroidWrapper C++ class connects with GUI and
implements actions that call start and stop the tracker and starts liveness verification.
The specific classes and methods that demonstrate visage|SDK are:
C++:
-
AndroidWrapper: Provides an Java interface to main tracker and liveness functions.
-
AndroidImageCapture: Used for passing one raw image to the tracker.
-
AndroidCameraCapture: Used for passing input from Android camera to the tracker.
-
VisageRendering: Contains methods that use OpenGL to do all the necessary rendering (displaying tracking results and messages and images during liveness verification).
Java:
-
StartupActivity: Android activity that starts when sample application is launched.
-
TrackerActivity: Android activity that starts tracking from image or camera or liveness verification.
-
ImageTrackerView: Loading image from SD card, sending image data to tracker, displaying image and tracking results.
-
JavaCamTrackerView: Grabbing camera preview frame, sending frame data to tracker, displaying camera video feed and tracking results.