Run Sample Code

This guide walks you through setting up and running the TUIRoomKit video conference Demo, so you can quickly experience high-quality, multi-user video meetings. By following these steps, you can launch the Demo in under 10 minutes and explore a fully-featured video conferencing solution with a complete UI.
Room Preparation Page
Room Main Page
Member Management










Prerequisites

Activate the Service
Refer to Activate the Service to obtain a trial version of TUIRoomKit and retrieve your SDKAppID and SDKSecretKey.
SDKAppID: The application ID for your Room instance, obtained from the console. This acts as the unique identifier for your app.
SDKSecretKey: The secret key associated with your application.

Environment Setup

Android 5.0 (SDK API level 21) or higher
Gradle version 8.0 or above
Two devices running Android 5.0 or higher
JDK version 17, 18, or 19 required

Obtain the Demo

1. Download the source code. You can obtain the Demo in one of two ways:
Clone the project locally
Download and extract the Demo
Open your terminal and run:
git clone https://github.com/Tencent-RTC/TUIKit_Android
Download the TUIKit_Android Demo and extract the archive.
2.
Open the project: Launch Android Studio and open the TUIKit_Android project.




Configure the Demo

Set SDKAppID and SDKSecretKey: Locate the TUIKit_Android/application/debug/src/main/java/com/tencent/qcloud/tuikit/debug/GenerateTestUserSig.java file and enter your acquired SDKAppID and SDKSecretKey.




Build and Run the Demo

1.
In the upper right corner of Android Studio, select the device where you want to run the Demo.



2.
After selecting your device, click Run to deploy TUIKit_Android to your chosen device.



Note:
For a full test of the conference room workflow, we recommend running the Demo on two devices and logging in with two distinct users (for example, one device as the host and one as a participant).

Login and Registration

After launching the Demo, enter your User ID to log in. If the User ID is not registered, you will be redirected to the registration page where you can set your nickname.
Login Page
Registration Page






Tip:
Avoid using simple UserIDs like "1", "123", or "111" to prevent login failures caused by duplicate IDs during multi-user testing. For debugging, use a unique UserID.

Room Features

After logging in, access the TUIRoomKit Demo feature page from the conference entry on the main page.
Feature Entry
Standard Room Main Page
Member Management Panel









Note:
To test audio/video interoperability across devices, ensure the SDKAppID in TUIKit_Android/application/debug/src/main/java/com/tencent/qcloud/tuikit/debug/GenerateTestUserSig.java is identical on all devices.

FAQs

Why does the Demo show a signature error or fail to log in?

Verify that the SDKAppID and SDKSecretKey in TUIKit_Android/application/debug/src/main/java/com/tencent/qcloud/tuikit/debug/GenerateTestUserSig.java match the credentials from the TRTC Console Application Management.

Will running the Demo with a Gradle version lower than 8.0 cause problems?

Yes. Using an outdated Gradle version may lead to dependency download failures or compilation errors. Please upgrade Gradle in Android Studio to version 8.0 or above.

How do I resolve the "Unknown Kotlin JVM target" compilation error?

This error occurs if your local environment is set to a JDK version (such as JDK 21) that is not supported. The Demo uses Kotlin 1.9, which does not support compiling to that JVM target. Set the Gradle JDK in Android Studio to version 17, 18, or 19.

How can I remove the call and live streaming modules from the Demo?

The Demo integrates three core TRTC scenarios: calling (TUICallKit), live streaming (TUILiveKit), and conferencing (TUIRoomKit). If you only need the conference scenario, streamline the project by:
1.
Remove the dependencies for TUILiveKit and TUICallKit from settings.gradle, then re-run SyncNow.
2.
Delete all code related to calling and live streaming scenarios from the Demo project.
3.
Resolve any compilation errors, and rebuild the Demo.

Contact Us

If you have any questions or suggestions during integration or usage, please contact info_rtc@tencent.com.