2

I have an android application and i want to add Zoom SDK to my apps. but the size of apps increasingly so much. I have read some solution and one of them is to use Dynamic Module Feature from android. I decide to set the SDK will downloaded based on user demand. is there way to add SDK native to dynamic module in our Apps? Thanks.

I've make some Dynamic Module Feature and add Zoom SDK module to that Dynamic Module Feature but my MainActivity class from that Dynamic Module Feature cannot access anything from that Zoom SDK.

This is my project structure : enter image description here

i have dynamic module with name 'zoomdynamicmodule', and there are 2 module (commonlib & mobilertc) from zoom SDK. but i cannot import that ZoomSDK on my ZoomActivity class. Is the method i use wrong to add Zoom SDK as dynamic module? Please Help.

Thanks.

mpa__
  • 33
  • 4

1 Answers1

0

You need to initialize the mobilertc from .AAR file to difference module, or with another method to initialize AAR.

I only have an experience with initialize mobilertc from .AAR from difference module.

  1. First of all make new folder for your mobilertc library,
  2. Create build.gradle file, and put this code in build.gradle file,
configurations.maybeCreate("default")
artifacts.add("default", file('mobilertc.aar'))
  1. Move mobilertc.aar file to your new folder with the same place with your new build.gradle,
  2. Open your settings.gradle file in your Android Studio, and add your new folder name of your mobilertc library start with ':', example: the folder name where I put the mobilertc aar is "mobilertc" then in settings.gradle I add this line, include ':mobilertc',
  3. On your dynamic feature build.gradle, don't forget to add implementation project for mobilertc library in dependencies.
dependencies {
    implementation project(':mobilertc')
}
  1. Sync the Gradle. And try initialize the Zoom SDK again.

Hope my answer can help you and another user who read this answer :)

Liong
  • 1,324
  • 12
  • 18