이 페이지는 현재 영어로만 제공되며 한국어 버전은 곧 제공될 예정입니다. 기다려 주셔서 감사드립니다.

Android

This document will guide you on how to quickly run the Voice Live Streaming Demo. By following this document, you can run the Demo within 10 minutes and eventually experience a complete UI interface for the Voice Live Streaming feature.
Host: During live streaming
Audience: Mic Connect







Environment preparations

Android 5.0 (SDK API level 21) or above.
Gradle 4.2.1 or later.
Two Android 5.0 or newer devices.

Step 1: Download the Demo

1. Download the source code of TUILiveKit Demo from GitHub, or directly run the following command in the terminal:
2. Open the TUILiveKit Android project through Android Studio:




Step 2: Configure the Demo

1. Activate the TRTC service, obtain the SDKAppID and SDKSecretKey.



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: Running the Demo

1. In the top right corner of Android Studio, select the device you want to run the Demo on as shown below:



2. After selecting, click run to deploy the TUILiveKit Android Demo on the target device.



3. Once the Demo successfully runs on the device, you can initiate and watch the live streaming by following the steps below.

Step 4: Voice Live Streaming

Note:
In order to allow you to experience the complete video live broadcast process, please log in two users on two devices to use the Demo, one as the host and the other as the audience.

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:
Try to avoid setting your User ID to simple strings like "1", "123", "111", as TRTC does not support the same User ID being logged into from multiple devices. Such User IDs like "1", "123", "111" are easily occupied by your colleagues during collaborative development, leading to login failures. Therefore, we recommend setting highly recognizable User IDs while debugging.

2. The anchor starts the Voice Live Room

Click the Start Live button in the middle of the bottom of the homepage to enter the broadcast preview page, and then click Start Live to start the live broadcast.
Anchor (Before entering)
Anchor (Preview)
Anchor (Live)










3. Viewers join the Voice Live Room.

Click on any room in the live broadcast list to enter the live broadcast room.
Audience (Before entering)
Audience (After entering)