Communication Integration - Android

Step 1: Obtain the SDK

Download either of the following latest Agora Native SDKs from downloads or contact

  • Voice Package
  • Full Package

Each package has libs and samples folders, while samples is used in Communication Quickstart - Android.

Step 2: Prepare the Environments

  1. Be sure that the following development environments are satisfied:

    • Android SDK API Level> = 16
    • Android Studio 2.0 or later
    • Real Android devices with audio and video functionality
    • Apps require Android 4.1 and above devices
  2. Copy the following libraries from the libs folder included in the package downloaded in Step 1: Obtain the SDK according to your actual needs.

    • agora-rtc-sdk.jar (mandatory)
    • armeabi-v7a/
    • x86/
    • arm64-v8a
    • include


    When you copy the libraries to the libs folder in the targeted path, and if there is any Chinese character in the path, the sample code won’t be compiled successfully, and it will display ASCII code in the error message.

  3. Put the above required libraries, for example, jar file and so file in the correct libs path according to the settings in the build.gradle file, for example,

  4. Specify the directory of the so file in the build.gradle file as the path of the libs folder in the above step.

    For example,

  5. Import the AAR package.


    This step is only applicable to the users who want to integrate the image enhancement function in Agora Native SDK.

    1. Download the latest Image Enhancement package from

    2. Select File > Project Structure… in the Android Studio.

    1. Click +.

    2. Click Import .JAR/.AAR Package and proceed with Next.

    3. Select the required aar file.

    4. Once imported, a new folder will be created under the root directory, for example,

  6. Configure the NDK if the following error displays:


    It means the NDK is not installed. Download it from website, and put it in the Android location, for example,

  7. The following permissions are required in the AndroidManifest.xml file for your application when deployed:

    • <uses-permission android:name=”android.permission.INTERNET” />
    • <uses-permission android:name=”android.permission.RECORD_AUDIO” />
    • <uses-permission android:name=”android.permission.CAMERA” />
    • <uses-permission android:name=”android.permission.MODIFY_AUDIO_SETTINGS” />
    • <uses-permission android:name=”android.permission.ACCESS_NETWORK_STATE” />
  8. Click Sync Project With Gradle Files until the sync is complete.



When you write the obfuscated code, be sure that you add the following code.


Step 3: Call APIs

Refer to Communication API - Android to implement the required functions.