
atomic_x directory (under TUIKit_Android) and the tuicallkit-kt subdirectory (under call) to the directory at the same level as your project's app directory, as shown below.
settings.gradle.kts (or settings.gradle) file in the project root directory. Add the following code to import the tuicallkit-kt and atomic_x components into your project.include(":tuicallkit-kt")include(":atomic_x")
include ':tuicallkit-kt'include ':atomic_x'
build.gradle.kts (or build.gradle) file under the app directory, and add the following code in dependencies to declare the app's dependency on the component.dependencies {api(project(":tuicallkit-kt"))}
dependencies {api project(':tuicallkit-kt')}
TRTC SDK,IM SDK,tuicallengine and public library tuicore by default. Developers do not need to configure them separately. If needed, just modify the version number in tuicallkit-kt/build.gradle file to upgrade.proguard-rules.pro Configuration:Since the SDK internally uses Java reflection, certain classes must be added to the non-obfuscation list (ProGuard exclusion list). Please add the following configuration to the end of the proguard-rules.pro file:-keep class com.tencent.** { *; }
AndroidManifest.xml Configuration:In the AndroidManifest.xml file within the app directory, add tools:replace="android:allowBackup" within the <application> node to overwrite the component's default settings and apply your own configuration.// app/src/main/AndroidManifest.xml<applicationandroid:name=".BaseApplication"android:allowBackup="false"android:icon="@drawable/app_ic_launcher"android:label="@string/app_name"android:largeHeap="true"android:theme="@style/AppTheme"tools:replace="android:allowBackup">
import com.tencent.qcloud.tuicore.TUILoginimport com.tencent.qcloud.tuicore.interfaces.TUICallbackimport com.tencent.qcloud.tuikit.tuicallkit.debug.GenerateTestUserSigclass MainActivity : ComponentActivity() {override fun onCreate(savedInstanceState: Bundle?) {super.onCreate(savedInstanceState)val userId = "denny" // replace with your UserIdval sdkAppId = 0 // replace with the SDKAppID obtained from the consoleval secretKey = "****" // replace with the SecretKey obtained from the consoleval userSig = GenerateTestUserSig.genTestUserSig(userId, sdkAppId, secretKey)TUILogin.login(this, sdkAppId, userId, userSig, object : TUICallback() {override fun onSuccess() {}override fun onError(errorCode: Int, errorMessage: String) {}})}}
import com.tencent.qcloud.tuicore.TUILogin;import com.tencent.qcloud.tuicore.interfaces.TUICallback;import com.tencent.qcloud.tuikit.tuicallkit.debug.GenerateTestUserSig;public class MainActivity extends AppCompatActivity {@Overridepublic void onCreate(Bundle savedInstanceState) {super.onCreate(savedInstanceState);String userId = "denny"; // replace with your UserIdint sdkAppId = 0; // replace with the SDKAppID obtained in step 1 on the consoleString secretKey = "****"; // replace with the SecretKey obtained in step 1 on the consoleString userSig = GenerateTestUserSig.genTestUserSig(userId, sdkAppId, secretKey);TUILogin.login(this, sdkAppId, userId, userSig, new TUICallback() {@Overridepublic void onSuccess() {}@Overridepublic void onError(int errorCode, String errorMessage) {}});}}
Parameter | Type | Description |
userId | String | Only allowing a combination of uppercase and lowercase letters (a-z A-Z), numbers (0-9), hyphens, and underscores. |
sdkAppId | int | The unique identifier SDKAppID of the audio and video application created in the Tencent Real-Time Communication (TRTC) Console. |
secretKey | String | The SDKSecretKey of the audio/video application created in the Tencent Real-Time Communication (TRTC) Console. |
userSig | String | A security protection signature used to authenticate user login, confirm whether the user is genuine, and prevent malicious attackers from misappropriating your cloud service usage rights. |
setSelfInfo function to set your nickname and avatar. The set nickname and avatar will be displayed on the caller/callee interface.import com.tencent.qcloud.tuikit.tuicallkit.TUICallKitval nickname = "jack"val avatar = "https:/****/user_avatar.png"TUICallKit.createInstance(context).setSelfInfo(nickname, avatar, null)
import com.tencent.qcloud.tuikit.tuicallkit.TUICallKit;String nickname = "jack";String avatar = "https:/****/user_avatar.png";TUICallKit.createInstance(context).setSelfInfo(nickname, avatar, null);
Parameter | Type | Description |
nickname | String | Target user's nickname |
avatar | String | Target user's avatar |
calls function and specifying the media type (voice or video) and the callee's User ID list (userIdList). The calls interface supports both one-to-one and group calls. A one-to-one call is initiated when the userIDList contains only a single User ID; a group call is initiated when it contains multiple User IDs.import com.tencent.qcloud.tuikit.tuicallkit.TUICallKitimport io.trtc.tuikit.atomicxcore.api.call.CallMediaTypeimport io.trtc.tuikit.atomicxcore.api.call.CallParamsval userIdList = mutableListOf<String>()userIdList.add("mike")val mediaType = CallMediaType.Audioval callParams = CallParams()TUICallKit.createInstance(context).calls(userIdList, mediaType, params, null)
import com.tencent.qcloud.tuikit.tuicallkit.TUICallKit;import io.trtc.tuikit.atomicxcore.api.call.CallMediaType;import io.trtc.tuikit.atomicxcore.api.call.CallParams;List<String> userIdList = new ArrayList<>();userIdList.add("mike");CallMediaType mediaType = CallMediaType.Audio;CallParams params = new CallParams();TUICallKit.createInstance(this).calls(userIdList, mediaType, params, null);
Parameter | Type | Description |
userIdList | List<String> | Target user ID list |
mediaType | Media type of the call, such as video call, voice call | |
params | Call extension parameters, such as room number, call invitation timeout. |

import com.tencent.qcloud.tuikit.tuicallkit.TUICallKitTUICallKit.createInstance(this).enableFloatWindow(true)
import com.tencent.qcloud.tuikit.tuicallkit.TUICallKit;TUICallKit.createInstance(this).enableFloatWindow(true);
enableIncomingBanner. By default, this feature is disabled (false). When the callee receives an inbound call, the full-screen call waiting interface is shown first. When the banner is enabled, a notification banner will display initially, switching to the full-screen view as required. Note that displaying the banner requires floating window permission. The exact display behavior depends on permission settings and whether the app is running in the foreground or background. For details, refer to the incoming call display policy for the callee.
import com.tencent.qcloud.tuikit.tuicallkit.TUICallKitTUICallKit.createInstance(context).enableIncomingBanner(true)
import com.tencent.qcloud.tuikit.tuicallkit.TUICallKit;TUICallKit.createInstance(context).enableIncomingBanner(true);
calls method to initiate a call, if the list of called users exceeds one person, it is automatically recognized as a multi-person call. Other members can then join this multi-person call using the join method.calls method is used to initiate a call, if the callee User ID list (userIdList) contains more than one user, it will be automatically deemed a multi-person call.import com.tencent.cloud.tuikit.engine.call.TUICallDefineimport com.tencent.qcloud.tuikit.tuicallkit.TUICallKitimport io.trtc.tuikit.atomicxcore.api.call.CallMediaTypeimport io.trtc.tuikit.atomicxcore.api.call.CallParamsval userIdList = mutableListOf<String>()userIdList.add("mike")userIdList.add("tate")val mediaType = CallMediaType.Audioval params = CallParams()TUICallKit.createInstance(context).calls(userIdList, mediaType, params, null)
import com.tencent.cloud.tuikit.engine.call.TUICallDefine;import com.tencent.qcloud.tuikit.tuicallkit.TUICallKit;import io.trtc.tuikit.atomicxcore.api.call.CallMediaType;import io.trtc.tuikit.atomicxcore.api.call.CallParams;List<String> userIdList = new ArrayList<>();userIdList.add("mike");userIdList.add("tate");CallMediaType mediaType = CallMediaType.Audio;CallParams params = new CallParams();TUICallKit.createInstance(context).calls(userIdList, mediaType, params, null);
Parameter | Type | Description |
userIdList | List<String> | Target user ID list |
mediaType | Media type of the call, such as video call, voice call | |
params | Call extension parameters, such as room number, call invitation timeout. |
join method to enter the specified multi-person call.import com.tencent.qcloud.tuikit.tuicallkit.TUICallKitval callId = "123456"TUICallKit.createInstance(this).join(callId, null)
import com.tencent.qcloud.tuikit.tuicallkit.TUICallKit;String callId = "123456";TUICallKit.createInstance(this).join(callId, null);
Parameter | Type | Description |
callId | String | The unique ID for this call. |
TUIThemeManager.getInstance().changeLanguage method.import com.tencent.qcloud.tuicore.TUIThemeManager;public class MainActivity extends BaseActivity {@Overridepublic void onCreate(Bundle savedInstanceState) {super.onCreate(savedInstanceState)val language = TUIThemeManager.LANGUAGE_ZH_CNTUIThemeManager.getInstance().changeLanguage(applicationContext, language)}}
import com.tencent.qcloud.tuicore.TUIThemeManager;public class MainActivity extends BaseActivity {@Overridepublic void onCreate(Bundle savedInstanceState) {super.onCreate(savedInstanceState);String language = TUIThemeManager.LANGUAGE_EN;TUIThemeManager.getInstance().changeLanguage(getApplicationContext(), language);}}
Parameter | Type | Description |
language | String | TUIThemeManager.LANGUAGE_EN: English. TUIThemeManager.LANGUAGE_AR: Arabic. TUIThemeManager.LANGUAGE_ZH_HK: Traditional Chinese. TUIThemeManager.LANGUAGE_ZH_CN: Simplified Chinese. |
setCallingBell interface to set the incoming call ringtone received by the callee.import com.tencent.qcloud.tuikit.tuicallkit.TUICallKitval filePath = "***/callingBell.mp3"TUICallKit.createInstance(context).setCallingBell(filePath)
import com.tencent.qcloud.tuikit.tuicallkit.TUICallKit;String filePath = "***/callingBell.mp3";TUICallKit.createInstance(context).setCallingBell(filePath);
Parameter | Type | Description |
filePath | String | ringtone file path |
enableMuteMode.import com.tencent.qcloud.tuikit.tuicallkit.TUICallKitTUICallKit.createInstance(context).enableMuteMode(true)
import com.tencent.qcloud.tuikit.tuicallkit.TUICallKit;TUICallKit.createInstance(context).enableMuteMode(true);
Icon | File name | Description |
![]() | callview_ic_dialing.png | Answer incoming call icon |
![]() | callview_ic_hangup.png | Hang Up Call icon |
![]() | callview_ic_mic_unmute.png | Turn off the mic icon |
![]() | callview_ic_handsfree_disable.png | Turn off the speaker icon |
![]() | callview_ic_camera_disable.png | Camera Off icon |
![]() | callview_ic_add_user_black.png | Invite user icon during call |
Feedback