Banuba SDK Android

image

Banuba SDK delivery includes the following parts: banuba_sdk.aar and banuba_effect_player.aar.

banuba_effect_player.aar provides a relatively low-level cross-platform API described in the API reference.

banuba_sdk.aar is built on top of banuba_effect_player.aar. This library provides the Android-specific functionality.

banuba_effect_player.aar provided in a compiled form and banuba_sdk.aar in sources are available for your reference and fine-tuning.

The entry point to banuba_sdk.aar library is BanubaSdkManager class. This class provides the following functionality:

  • Configure rendering mode -- setDrawSize, setAutoFaceOrientation, setFaceOrientation.
  • Setup the watermark -- setWatermarkInfo.
  • Manage camera -- openCamera, closeCamera, setCameraFacing, setCameraZoom, notifyGotCameraPermissions.
  • Open GL context management -- releaseSurface, attachSurface, onSurfaceCreated, onSurfaceChanged, onSurfaceChanged, onSurfaceDestroyed.
  • Take a screenshot or image with the effect using the camera -- takePhoto, processCameraPhoto.
  • Apply the effect to an external image (e.g. from disk) -- processImage.
  • Record a video with the effect --startVideoRecording, stopVideoRecording.
  • Continuous photo rendering (i.e. the dynamic effect applied to the frozen image) -- startEditingImage, stopEditingImage, takeEditedImage
  • Send frames to other destinations (e.g. via WebRTC) -- startForwardingFrames, stopForwardingFrames.

banuba_sdk contains the following packages:

  • internal.camera -- the functionality related to the camera capture. See Camera2 and CameraThread.
  • internal.encoding -- audio and video capture and recording.
  • internal.gl -- various Open GL ES utils.
  • internal.photo -- screenshot capture.
  • internal.renderer -- rendering thread. See RenderThread.

The Effect component makes up an essential part of the SDK usage. It's represented as a folder with scripts and resources. Please, refer to Android demo app section for more details about effects.

Binaries size

We include native debug symbols in our .aar archives, so you may find that banuba_effect_player.aar is too big (about 100 MB). These symbols will help us to get clear crash logs. Nevertheless, Android Studio will silently strip them from release apps, and no extra actions are required.

Still have any questions about FaceAR SDK for Android?

Visit our FAQ or contact our support.

Last updated on