Search code examples
androidkotlinagora.io

How to integrate both Audio Call and Video Call Agora SDKs in the same App


So I managed to implement the Agora Audio Calls 1 to 1 SDK and also Video 1 to 1 SDK but in two different apps (1 app uses the audio sdk and the other uses the video sdk).

I am wondering how can I implement them both in the same app so that the users can start an audio call and switch to video at their will and viceversa (similar to whatsapp)?

The main issue I am facing is that both audio and video SDKs use the same name when you download them (agora-rtc-sdk) so I am a bit confused on how should I use them both because of this issue.

Can one of the SDKs (and the other files related to it) simply be renamed to something else and then imported into the project or what is the catch here ?


Solution

  • You need to use only 1 SDK for your scenario. The Video SDK: https://docs.agora.io/en/Video/landing-page?platform=Android

    For an Audio Call using the Video SDK, all you need to do is call the disableVideo() method before joining the channel. Here's the documentation on this: https://docs.agora.io/en/Video/API%20Reference/java/classio_1_1agora_1_1rtc_1_1_rtc_engine.html#a8d6fad1572e62c553a660a70663c682f