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 TUICallKit
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 tuicallkit-kt/build.gradle
file.proguard-rules.pro
file:-keep class com.tencent.** { *;}
TUICallKit
helps you apply for camera, mic, and storage read/write 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. Make sure 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 access process faster. 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 from your server every time the application uses the TUICallKit
component.//Make a 1v1 video call (assuming UserID is mike)TUICallKit.createInstance(context).call("mike", TUICallDefine.MediaType.Video)
// Make a 1v1 video call (assuming UserID is mike)TUICallKit.createInstance(context).call("mike", TUICallDefine.MediaType.Video);
| |
Caller | Callee |
TUICallKit
.TUICallKit
crashes and outputs the log "No implementation found for xxxx"?java.lang.UnsatisfiedLinkError: No implementation found for void com.tencent.liteav.base.Log.nativeWriteLogToNative(int, java.lang.String, java.lang.String) (tried Java_com_tencent_liteav_base_Log_nativeWriteLogToNative and Java_com_tencent_liteav_base_Log_nativeWriteLogToNative__ILjava_lang_String_2Ljava_lang_String_2)at com.tencent.liteav.base.Log.nativeWriteLogToNative(Native Method)at com.tencent.liteav.base.Log.i(SourceFile:177)at com.tencent.liteav.basic.log.TXCLog.i(SourceFile:36)at com.tencent.liteav.trtccalling.model.impl.base.TRTCLogger.i(TRTCLogger.java:15)at com.tencent.liteav.trtccalling.model.impl.ServiceInitializer.init(ServiceInitializer.java:36)at com.tencent.liteav.trtccalling.model.impl.ServiceInitializer.onCreate(ServiceInitializer.java:101)at android.content.ContentProvider.attachInfo(ContentProvider.java:2097)at android.content.ContentProvider.attachInfo(ContentProvider.java:2070)at android.app.ActivityThread.installProvider(ActivityThread.java:8168)at android.app.ActivityThread.installContentProviders(ActivityThread.java:7709)at android.app.ActivityThread.handleBindApplication(ActivityThread.java:7573)at android.app.ActivityThread.access$2600(ActivityThread.java:260)at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2435)at android.os.Handler.dispatchMessage(Handler.java:110)at android.os.Looper.loop(Looper.java:219)at android.app.ActivityThread.main(ActivityThread.java:8668)at java.lang.reflect.Method.invoke(Native Method)at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:513)at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1109)
TUICallKit
are implemented through JNI, but Android Studio may not package native .so libraries when compiling the APK under some conditions. In this case, just clean the project again.
Was this page helpful?