Integrate with your app

The code on this page works with either the default UI or the custom UI.

After getting some hands-on experience with our SDK, integrate our Meeting SDK for Android with your own applications.

Locate the libraries

The aar library is in the mobilertc folder. Make sure these files are in this folder. If anything is different, download the SDK again.


mobilertc
    mobilertc/
    ├── build.gradle
    ├── mobilertc.aar

All of the dependencies should be available under the mobilertc/build.gradle file. Do not change any of the dependency versions, as it may cause build issues.

Add modules and configure dependencies

  1. Create a new directory called mobilertc in your project's root folder. Copy these files from the downloaded Meeting SDK project into the newly created mobilertc. plaintext mobilertc-android-studio/mobilertc/build.gradle mobilertc-android-studio/mobilertc/mobilertc.aar
  2. Modify settings.gradle to include the newly created module.
    include ':mobilertc'
    
  3. In build.gradle, reference where we want to use the module.
    implementation project(":mobilertc")
    

Now you're able to import classes from the SDK in your own applications and enjoy the Zoom Meeting video conference experience in your apps.

Add SDK-required dependencies

To deliver a better in-meeting experience, beginning in version 5.4.3.603, set the configuration hardware accelerated to be TRUE in your app's build.gradle file.

android:hardwareAccelerated="true"

The hardware acceleration attribute belongs to an activity element in your app's manifest. Apply this to the element related to any activity in the app that renders video.

If there are any version conflicts observed while building, please resolve them using proper resolution strategy. Use the sample application for reference.

Use the dynamic delivery module

Android's dynamic delivery lets you get the Meeting SDK delivered as an optional package after the app is installed. The dynamic feature demo contains two modules.

  • dyanmic_sample module - A simple sample app that includes the SDK as a dynamic feature module using dynamic_base.aar.
  • feature_mobilertc module - The module that exposes the SDK's mobilertc.aar package for use as a dynamic feature.

Note:

  • Be aware of the dependency configuration of the base and feature modules.
  • For the base module dependency configuration, refer to the dynamic_sample module's dependency configuration in build.gradle.
  • For the feature module dependency configuration, refer to the feature_mobilertc module's dependency configuration in build.gradle.
  • Using bundletool to test dynamic functions locally won't work. To fully test this function, upload to Google Play.

Use Android foreground service permission in the Meeting SDK

The code on this page works with either the default UI or the custom UI.

Starting with Android 14, Google requires developers to specify appropriate foreground service types in their apps.

The Meeting SDK uses these foreground service permissions.

  • FOREGROUND_SERVICE_MICROPHONE - Allow the capability to receive audio when the app is put in the background.
  • FOREGROUND_SERVICE_MEDIA_PLAYBACK - Allow the capability to share audio while screen sharing.
  • FOREGROUND_SERVICE_MEDIA_PROJECTION - Allow the capability to project the screen while screen sharing.
  • FOREGROUND_SERVICE_CONNECTED_DEVICE - Allow the capability to use Bluetooth device as the audio source.

The screen sharing feature in our Meeting SDK requires foreground service. If the screen sharing feature is not included in your project, add this code in Androidmanifest.xml to remove the service and permissions.

To ensure the audio works as expected, maintain FOREGROUND_SERVICE_MICROPHONE and FOREGROUND_SERVICE_CONNECTED_DEVICE permissions in the project and start the foreground service when joining a meeting.

<uses-permission android:name="android.permission.FOREGROUND_SERVICE_MEDIA_PROJECTION" tools:node="remove" />
<uses-permission android:name="android.permission.FOREGROUND_SERVICE_MEDIA_PLAYBACK" tools:node="remove" />
<service
    android:name="com.zipow.videobox.share.ScreenShareServiceForSDK"
    android:exported="false"
    android:foregroundServiceType="microphone|connectedDevice"
    tools:replace="android:foregroundServiceType"
    android:label="Zoom"/>

Troubleshooting: conflicts with libc++_shared.so

To fix a conflict with libc++_shared.so, try these options in this order. Check after each change to see if that fix resolves the issue.

  1. Check the project's NDK version. Our SDK's currently supported NDK version is 27. If you're not sure which version you're using, define the NDK version in the build.gradle file.

  2. Check if there are any other libc++_shared.so references in your project that cause a conflict.

    • If you have your own C++ library in your project, define the ndkVersion 27 in build.gradle.
    • If you're using a third-party module that includes libc++_shared.so, remove the third-party module from your project or remove libc++_share.so from the module.
  3. Add these packagingOptions in build.gradle.

    packagingOptions {
        pickFirst 'lib/x86/libc++_shared.so'
        pickFirst 'lib/x86_64/libc++_shared.so'
        pickFirst 'lib/armeabi-v7a/libc++_shared.so'
        pickFirst 'lib/arm64-v8a/libc++_shared.so'
    }