TUICallKit
component. Performing the following key steps generally takes about ten minutes after which you can implement the video call feature with complete UIs.tuicallkit-kt
subdirectory in the Android
directory to the directory at the same level as app
in your current project, as shown below:settings.gradle(or settings.gradle.kts)
file in the project root directory and add the following code to import the component downloaded in step 2 to your current project:include ':tuicallkit-kt'
include(":tuicallkit-kt")
build.gradle(or build.gradle.kts)
file in the app
directory and add the following code to declare the dependencies of the current application on the component just added:api project(':tuicallkit-kt')
api(project(":tuicallkit-kt"))
TUICallKit
project depends on TRTC SDK
, Chat SDK
, tuicallengine
, and the tuicore
public library internally by default with no need of additional configuration. To upgrade the version, modify the version in tuicallkit-kt/build.gradle
file.proguard-rules.pro
file:-keep class com.tencent.** { *; }
TUICallKit
helps you apply for camera, mic, and bluetooth permissions internally. If you need more or fewer permissions based on your actual business conditions, you can modify tuicallkit-kt/src/main/AndroidManifest.xml
.TUICallKit
componentTUICore
to log in to the TUICallKit
component. This step is very important, as the user can use the component features properly only after a successful login. Carefully check whether the relevant parameters are correctly configured:TUILogin.login(context,1400000001, // Replace it with the `SDKAppID` obtained in step 1."denny", // Replace it with your `UserID`."xxxxxxxxxxx", // You can calculate a `UserSig` in the console and enter it here.object : TUICallback() {override fun onSuccess() {}override fun onError(errorCode: Int, errorMessage: String) {}})}
login
function are as detailed below:SDKSecretKey
to encrypt the information such as SDKAppID
and UserID
. You can generate a temporary UserSig
by clicking the UserSig Generate button in the console.genTestUserSig
function to calculate UserSig
locally, so as to help you complete the current integration process more quickly. However, this scheme exposes your SecretKey
in the application code, which makes it difficult for you to upgrade and protect your SecretKey
subsequently. Therefore, we strongly recommend you run the UserSig
calculation logic on the server and make the application request the UserSig
calculated in real time every time the application uses the TUICallKit
component from the server.// Initiate a one-to-one video call (assuming UserID is mike)TUICallKit.createInstance(context).call("mike", TUICallDefine.MediaType.Video)
// Initiate a one-to-one video call (assuming UserID is mike)TUICallKit.createInstance(context).call("mike", TUICallDefine.MediaType.Video);
| |
Caller | Callee |
Was this page helpful?