Skip to main content

You are viewing Agora Docs forBeta products and features. Switch to Docs

App size optimization

A smaller app size means quicker download and installation times, which can lead to a better user experience. This page shows you how to manually install the Video SDK and reduce the app size of the SDK integrated app.

Manual installation

To manually install Video SDK from a download:

  1. Extract the files from the Android download to a local folder, <unzipped_package>.

  2. Copy the following files and folders from <unzipped_package>/rtc/sdk to your project:

    SDK File or folderPath in your project
  3. Select Project Files/app/libs/agora-rtc-sdk.jar file on navigation bar, right-click and then select add as a library.

Reduce the app size

To reduce the app size, implement the following strategies:

Use the audio SDK

Video SDK supports both audio and video functions, and the package size is large. If you only need to use the audio features, best practice is to integrate the Voice SDK.

Remove unneeded plugins

The SDK provides optional plugin dynamic libraries. The name of the plugin is suffixed with extension. See the plugin list for details on the function and size of the plugins. Refer to the following ways to exclude these plugins to reduce the size of the app.

Manual integration

When integrating through the official SDK download link, delete the plugin files you don't need.

Integration through Maven Central

When integrating the Android SDK through Maven Central, you can modify the dependencies in the /Gradle Scripts/build.gradle(Module: <projectname>.app) file to specify the dynamic libraries you need to integrate, and exclude the plugins you don't need. For the relationship between each file in the Android SDK and the gradle dependencies, see dependency implementation.

Refer to the following examples to include all plugins, exclude all plugins, or to include only the specified plugins.

  • If you need to use all plugins, specify the dependencies as follows:

    dependencies {
    implementation 'io.agora.rtc:full-sdk:4.0.1'
    implementation 'io.agora.rtc:full-screen-sharing:4.0.1'

  • If you do not need to use any plugin, specify the dependencies as follows:

    dependencies {
    implementation 'io.agora.rtc:full-rtc-basic:4.0.1'

  • If you only need to use specific plugins such as the AI ​​noise reduction plugin and Bel Canto plugin, specify the dependencies as follows:

    dependencies {
    def agora_sdk_version = "4.0.1"
    implementation "io.agora.rtc:full-rtc-basic:${agora_sdk_version}"
    implementation "io.agora.rtc:full-ains:${agora_sdk_version}"
    implementation "io.agora.rtc:audio-beauty:${agora_sdk_version}"

Dynamically Load .so Files

To reduce the size of the app's installation package, Video SDK provides the mNativeLibPath attribute in the RtcEngineConfig class to support dynamic loading of the required .so files. Refer to the following steps to implement this feature:

  1. Download the latest version of the SDK and decompress it.
  2. Integrate agora-rtc-sdk.jar into your project.
  3. Upload the .so files for all architectures to your server and make sure that the app can download the .so files for the target architecture over the network.
  4. When the app runs, it checks for the existence of an .so file. If not found, it downloads the .so file and saves it to the private directory of the app.
  5. When calling create to create and initialize an RtcEngine instance, set the mNativeLibPath config parameter to the app private directory where the .so file is located.
  6. After calling create successfully, the SDK automatically loads the .so file from the specified path.

This method is only suitable for manually integrating the Android SDK, not for integration through Maven Central.


This section contains content that completes the information in this page, or points you to documentation that explains other aspects to this product.

Plugin list

This section provides information on including plugins provided with Video SDK.

The following table shows the plugin library name, and the increase in app size after integration for each architecture:

PluginArchitectureLibrary nameIncrease in app after integration (KB)
AI noise reductionarm64-v8alibagora_ai_noise_suppression_extension.so2448
Bel cantoarm64-v8alibagora_audio_beauty_extension.so948
Video enhancementarm64-v8alibagora_clear_vision_extension.so776
Video screenshot uploadarm64-v8alibagora_content_inspect_extension.so1071
PVC insertarm64-v8alibagora_pvc_extension.so170
Spatial audio pluginarm64-v8alibagora_spatial_audio_extension.so3258
Virtual backgroundarm64-v8alibagora_segmentation_extension.so2756
Copyright musicarm64-v8a
  • libagora_drm_loader_extension
  • libagora_drm_loader_extension
  • libagora_drm_loader_extension
  • libagora_drm_loader_extension
Face recognitionarm64-v8alibagora_face_detection_extension.so488
Super resolutionarm64-v8alibagora_super_resolution_extension.so214
Screen sharingarm64libagora_screen_capture_extension.so675
arm64 & armv7AgoraScreenShareExtension.aar69
Video quality assessmentarm64-v8alibagora_video_quality_analyzer_extension.so570
AI echo cancellationarm64-v8alibagora_ai_echo_cancellation_extension.so3403

AI noise reduction plugin

The 4.x SDK supports the new version of AI noise reduction. The new version of AI noise reduction has better human voice fidelity, cleaner noise suppression, and adds the de-reverberation ability.

Bel canto plugin

The Bel Canto plugin provides a series of preset vocal effects, and also supports custom vocal effects through settings such as pitch, sound balance, and reverb. After integrating the bel canto plugin, you can call the following method to enable the bel canto effect you want:

  • setVoiceBeautifierPreset: Talking bel canto, singing bel canto, timbre change.
  • setAudioEffectPreset: Changing sound effects, genre sound effects, space shaping, electronic sound effects.
  • setVoiceConversionPreset: Basic voice changer.
  • setLocalVoicePitch, setLocalVoiceEqualization, setLocalVoiceReverb: Adjust the pitch, equalization and reverb effects to get the desired vocal effect.

Video enhancement plugin

The video enhancement plugin provides basic beauty, video noise reduction, dark light enhancement, color enhancement and other capabilities. After integrating the video enhancement plugin, you can call the following methods to enable the video enhancement function you want:

  • setBeautyEffectOptions: Set the basic beauty function.
  • setVideoDenoiserOptions: Set the video noise reduction function.
  • setLowlightEnhanceOptions: Set the low light enhancement function.
  • setColorEnhanceOptions: Set the color enhancement function.

Video screenshot upload plugin

The video screenshot upload plugin provides the ability to screenshot and upload videos sent by local users to meet the needs of video content supervision. After integrating the video screenshot upload plugin, you can call enableContentInspect to enable video screenshot upload.

PVC insert

PVC (Perceptual Video Coding) is a video coding method that reduces bandwidth consumption while ensuring the same image quality. Use it to improve video fluency in scenarios with limited bandwidth, and reduce traffic consumption in mobile network scenarios. If you need to use this function, please contact technical support.

Since v4.1.0, the SDK statically compiles the PVC library by default, and no longer provides plugins. If you have integrated the PVC plugin, you need to remove the PVC plugin from the project dependencies and recompile the project after upgrading.

Spatial audio plugin

The spatial audio plugin shapes the sense of direction of the remote user's voice. It simulates the propagation process of sound in the real world to realize the spatial sound effect when the local user listens to a remote user.

Virtual background plugin

After integrating the virtual background plugin, you can call enableVirtualBackground to enable the virtual background. Use a custom background image, a green screen to replace the original background image of the local user, or blur the background.

Starting from v4.1.0, the SDK provides a copyrighted DRM (Data Rights Management) music plugin to realize functions related to playing copyrighted music in real-time, interactive scenes, such as retrieving music resources, obtaining music lists and list details, preloading and playing music resources, downloading lyrics and posters, etc. See the v4.1.0 Release Notes for details.

Face recognition plugin

Agora provides a face recognition plugin since v4.1.1, that recognizes faces or portraits through face or virtual background segmentation algorithms. It uses higher-quality encoding for the ROI (Region of Interest) area during the encoding process to achieve sharper face or portrait effect. If you need to use this function, please contact technical support.

Super resolution plugin

After integrating the super-resolution plugin, you can call enableRemoteSuperResolution to increase the resolution of the remote video.

Since v4.1.1, the SDK statically compiles the super-resolution library by default. It no longer provides a plugin method. If you have previously integrated the super-resolution plugin, you need to remove it from the project dependencies and recompile the project after upgrading.

Screen sharing plugin

The screen sharing plugin supports sharing your own screen content with the audience or other users to improve communication efficiency. See screen sharing for details .

Video quality assessment plugin

Since v4.1.0, the SDK provides a Video Quality Assessment (VQA) plugin, which simulates the subjective feelings of real people to score video quality. If you need to use this function, please contact technical support.

AI echo cancellation plugin

The AI echo cancellation plugin preserves complete, clear, and smooth near-end human voice, even under poor echo-to-signal ratio, and significantly improves the system's echo cancellation. The dual-speak performance gives users a more comfortable call and live broadcast experience. It is widely used in conferences, voice chats, karaoke and other scenarios. If you need to use this function, please contact technical support.

Dependency implementation

When integrating the Video SDK through Maven Central, you can modify the dependencies in the /Gradle Scripts/build.gradle(Module: <projectname>.app) file to specify the dynamic libraries that you need to integrate. The relationship between each file and the required implementation is detailed in the table below:

Android Video SDK

FileCategoryimplementation field
  • agora-rtc-sdk.jar
  • SDK header files
libagora_pvc_extension.sooptionalio.agora.rtc:pvc (< v4.1.0)
libagora_super_resolution_extension.sooptionalio.agora.rtc:full-super-resolution (< v4.1.1)
libagora_drm_loader_extension.sooptionalio.agora.rtc:drm-loader (≥ v4.1.0)
libagora_udrm3_extension.sooptionalio.agora.rtc:drm (≥ v4.1.0)
libagora_ai_echo_cancellation_extension.sooptionalio.agora.rtc:aiaec (≥ v4.1.0)
libagora_face_detection_extension.sooptionalio.agora.rtc:full-roi-enc (≥ v4.1.1)
libagora_video_quality_analyzer_extension.sooptionalio.agora.rtc:full-vqa (≥ v4.1.0)
libagora_face_detection_extension.sooptionalio.agora.rtc:full-face-detection (≥ v4.1.1)

Android Audio SDK

FileCategoryimplementation field
  • agora-rtc-sdk.jar
  • SDK header files
libagora_drm_loader_extension.sooptionalio.agora.rtc:drm-loader (≥ v4.1.0)
libagora_udrm3_extension.sooptionalio.agora.rtc:drm (≥ v4.1.0)
libagora_ai_echo_cancellation_extension.sooptionalio.agora.rtc:aiaec (≥ v4.1.0)

Interactive Live Streaming