This guide is provided by Banuba. Agora is planning a documentation upgrade program for all extensions on the marketplace. Please stay tuned.
By integrating Banuba Face AR SDK and Agora.io SDK you can enable augmented reality features in video calls such as face filters, face touch up filters and virtual backgrounds. You can find the integration examples below.
- The latest Banuba SDK archive
- Banuba trial client token.
To receive a trial token or a full commercial licence from Banuba - please fill in our form on form on banuba.com website, or contact us via firstname.lastname@example.org.
Integrate Banuba Face AR extension
- Make sure that you have Android NDK and CMake are installed! Project contains C++ sources, so this is required! Recommended NDK versions is 21.1.6352462, required CMake version is 3.9, 3.14 or above is recommended (Android SDK manager provides 3.18.1, it should be installed).
- Get the latest Banuba SDK archive, Banuba trial client token. To receive full commercial license from Banuba - please fill in our form on form on banuba.com website, or contact us via email@example.com.
.aarfile from the Banuba SDK archive into
- Get the latest Agora Video SDK archive.
jarfiles from the Agora Video SDK archive into
- Copy architecture folders from the Agora Video SDK archive into
- Copy Agora SDK headers (
- Copy and Paste your Banuba client token into appropriate section of
app/src/main/java/com/banuba/sdk/agorapluginexample/ClientToken.ktwith " " symbols. For example: BANUBA_CLIENT_TOKEN = "place_your_token_here"
- Visit agora.io to sign up and get token, app ID and channel ID.
- Copy and Paste your Agora token, app ID and channel ID into appropriate section of
app/src/main/java/com/banuba/sdk/agorapluginexample/ClientToken.ktwith " " symbols. For example: AGORA_APP_ID = "place_your_token_here"
- Open the project in Android Studio and run the necessary target using the usual steps.
How to use
Add following imports:
Add extension to RtcEngineConfig:
Create and initialize BanubaResourceManager:
After those steps enable and initialize extension:
To enable/disable effects use the following code:
To retrieve current effects use the following code:
ArEffect contains following information:
name: String - pass to
banubaResourceManager.prepareEffect(Effect name, onEffectPrepared). Also can be used to display label on the UI
preview: Bitmap - can be used as preview image
To modify effects, add or remove effect folder in
By default sample contains the following effects: