video-quickstart-android: Video Android SDK is not Side-by-Side Compatible with other WebRTC Libraries

Description

We have received questions about using the Video Android SDK alongside either Google’s WebRTC library or another WebRTC based library. The Video Android SDK can not be pulled into a project alongside other WebRTC dependent libraries due to class conflicts in the package org.webrtc and conflicting native module names (libjingle_peerconnection_so). Developers could modify their build.gradle to avoid the Java class conflicts, but using our SDK alongside another WebRTC library results in undefined behavior. This issue has existed since the launch of Twilio Video on Android.

We are actively working on a long-term resolution for this issue but we do not have a precise timeline for a resolution. Any progress or updates will be submitted as comments to this issue. Please feel free to provide any additional details or use cases related to side-by-side support.


Steps to Reproduce

  1. Add the following to a build.gradle and compile your app.

Code

dependencies {
    implementation 'org.webrtc:google-webrtc:1.0.25003'
    implementation 'com.twilio:video-android:3.0.0'
}

Scope

The scope of side-by-side support can be described as follows:

As a consumer of the Video Android SDK and another WebRTC library, I can use each library in isolation within the same application but not at the same time. Using both libraries simultaneously results in undefined behavior because side-by-side support does not include interoperability.

About this issue

  • Original URL
  • State: closed
  • Created 6 years ago
  • Reactions: 1
  • Comments: 24 (8 by maintainers)

Most upvoted comments

Hi @criptis and @andschdk and @No1joey,

I wanted to give you an update on this ticket. First, thank you for using/considering Twilio and sorry for the delay.

We have made some great progress with this ticket, and we are hoping to get something out soon. Unless we find a major blocker, this could be within the next two weeks.

Thank you for your patience.

Kind regards, Aymen Naim

Hey @ruangchupa @UberMC and everyone else,

Video Android 5.1.0 contains contains side-by-side compatibility with other WebRTC based libraries.

Thank you!

I’m getting this issue when trying to implement Twilio and Tokbox sdk to our app. How can I avoid the Java class conflict by modifying the build.gradle? (I dont need side-by-side support just want to use them simultaneously)

Hey @ruangchupa

We have not completed this work for our Video Android SDK. At the moment there is no workaround. Currently, the Video Android SDK is only side-by-side compatible with the Voice Android SDK 3.2.0.

We do plan on implementing side-by-side support specifically for Video Android and other WebRTC based libraries.

Thank you

I’m in a task to do migration from our current video call 3rd party SDK to Twilio. For the first phase, we need to still use both SDKs to make the transition smooth but got duplicate class issue when building Android. Is there any update regarding this known issue? Or some workarounds I can do to make me able to build Android?

I’m getting this issue when trying to implement Twilio and Tokbox sdk to our app. How can I avoid the Java class conflict by modifying the build.gradle? (I dont need side-by-side support just want to use them simultaneously)

Did you able to done this? If yes, can you help me to fix this?

Yeah how? How are we suppose to transition out of TokBox? `* What went wrong: Execution failed for task ‘:app:checkDevDebugDuplicateClasses’.

1 exception was raised by workers: java.lang.RuntimeException: Duplicate class org.webrtc.AndroidVideoTrackSourceObserver found in modules libjingle_peerconnection_java.jar (com.opentok.android:opentok-android-sdk:2.14.0) and libwebrtc.jar (com.twilio:video-android:4.1.0) Duplicate class org.webrtc.AudioSource found in modules libjingle_peerconnection_java.jar (com.opentok.android:opentok-android-sdk:2.14.0) and libwebrtc.jar (com.twilio:video-android:4.1.0) Duplicate class org.webrtc.AudioTrack found in modules libjingle_peerconnection_java.jar (com.opentok.android:opentok-android-sdk:2.14.0) and libwebrtc.jar (com.twilio:video-android:4.1.0) `

That is correct @andschdk

We will provide updates on this ticket as progress is made.