App size optimization

Updated

Reduce the size of apps that integrate Agora SDK

Reducing the app size is of great significance in improving user experience. A smaller package size means that users consume less bandwidth and time to download the app. Consider the following use-cases where app size optimization is critical:

  • There are strict requirements on the size of the app. For example, running the app on smart wearable devices with limited storage space.

  • The target user group of the app is located in underdeveloped areas. The poor network connectivity causes the app download time to be too long.

This page shows you how to optimize the size of apps that integrate the Voice SDK.

Remove unnecessary extensions

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

Remove extensions when integrating manually

When integrating through the Direct download link, manually delete the extension files that you do not need to use.

Remove extensions when integrating using Maven Central

When integrating the Android SDK through Maven Central, you can modify the /Gradle Scripts/build.gradle(Module: <projectname>.app) file to specify the dynamic libraries you need to integrate and exclude extensions you do not need to use. For details on the correspondence between each file in the Android SDK and the fields in dependencies, see implementation fields for details.

Refer to the following samples to include, all, none, or selected extensions.

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

Reference

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

Extension list

Refer to the following information for an introduction to each Voice SDK extension and the increase in the size of your app after integration.

The information in this section is based on version 4.4.0 of the Voice SDK.