- Latest stable Android Studio
- Latest Gradle plugin
- Latest NDK
Together with the token, you will receive a configuration file
config.json which contains the required SDK resources defined by your token. Read more about this in Repack your SDK archive (minify SDK size) section.
Before building your project, place your client token inside the file:
With the client token, you will also receive the Banuba SDK archive for Android which contains:
- Banuba Effect Player (compiled Android library project with .aar extension),
- Banuba SDK (compiled Android library project with .aar extension),
- Effect examples located under
The SDK release archive contains all SDK resources by default. They may consume more disk space in the ready build.
To reduce the SDK size please use
sdk_repacking.py script provided with the SDK archive.
Please refer to SDK repacking readme in your SDK archive for more info and usage example.
libsdirectory in your project and add
- Open build.gradle (Module: app) and add Banuba SDK dependencies for your project
BanubaClientToken.javato your project.
Also check our Android Demo app to use some code snippets
Now you can run your project with BanubaSdk on your device
After integration of Banuba SDK libraries
banuba_sdk.aar your app size may increase significantly. It may happen if you use an 'android.tools' version earlier than
classpath com.android.tools.build:gradle:3.5.0. To minify your app size, update 'android.tools' to a newer version, e.g. classpath
com.android.tools.build:gradle:4.0.1. Then, rebuild your application and check that "strip" phase exists in the build log (
> Task :app:strip...).
The EffectPlayer xcframework allows you to use different face tracking algorithms for low, medium and high-end device classes.
Face tracking algorithms:
FAST— provides higher performance yet lower quality of face tracking.
GOOD— provides better tracking quality with larger resources usage.
MEDIUM— special type which uses algorithm with optimal balance of quality and performance.
See more in API reference.
The default settings as seen below are
GOOD for high-end and medium devices and
MEDIUM for others.
You can change the code to force usage of any face tracking mode for the desired group of devices.