This article will show you how to quickly build the video live streaming or voice room demo. By following this guide, you can build a video live streaming or voice room project complete with UI within 10 minutes.
Environment preparations
Android 5.0 (SDK API level 21) or above.
Gradle 8.0 or later.
Two Android 5.0 or newer devices.
Step 1: Download the Demo
1. Download the TUILiveKit Demo source code from GitHub, or directly run the following command in the command line: 2. Open the TUILiveKit Android project with Android Studio:
Step 2: Configure the Demo
2. Open the Android/debug/src/main/java/com/tencent/qcloud/tuikit/debug/GenerateTestUserSig.java file, and enter the SDKAppID and SDKSecretKey obtained when activate the service: Step 3: Run the Demo
1. I1. In the top right corner of Android Studio, select the device you want to run the demo on as shown below:
2. Click the run button to run the TUILiveKit Android demo on the target device.
3. After the demo is successfully run on the device, you can start and watch live broadcasts by following the steps below:
Step 4: Start a Live Broadcast
Note:
To try out the live broadcast feature, you need to log in to the demo with two different user IDs on two devices, one as the anchor and the other as an audience member.
1. Log in & Signup
Please enter your UserId
in the User ID field. If your current User ID has not been used before, you will be taken to the Registration page where you can set an avatar and nickname for yourself.
Anchor(mike) |
| Audiece(vince) |
|
| | | |
Note:
Avoid setting your User ID to a simple string like "1", "123", "111". TRTC does not support multi-device login using the same User ID. During collaborative development, User IDs like "1", "123", "111" are likely already used by your colleagues, leading to login failures. Therefore, we recommend setting more distinguishable User IDs for debugging.
2. The anchor starts the live broadcast.
On the homepage, tap the middle button in the bottom bar to enter the broadcast preview page and then tap "Go Live" to start a live broadcast.
Video Live:
Voice room:
3. Viewers join the live broadcast room.
Tap to enter any room in the live broadcast list.
Was this page helpful?