Starter Deal! First 3 month from only  $9.9 /month!
Starter Deal! First 3 month from only  $9.9 /month!
Grab It Now 
Live
  • Overview
  • Andorid
    • Run Sample Demo
    • Integration
    • API Documentation
    • Interactive Barrage
    • Interactive Gift
    • Release Notes
    • FAQs
  • iOS
    • Run Sample Demo
    • Integration
    • API Documentation
    • Interactive Barrage
    • Interactive Gift
    • Release Notes
    • FAQs
  • Overview
    • Overview
  • Activate the Service
  • Pricing
    • Live Monthly Packages
    • Pay-As-You-Go
    • Free Minutes
  • ErrorCode
Live

Run Sample Demo

This article will show you how to quickly run the video live streaming demo. Following this document, you can run the demo in 10 minutes and finally experience a video live streaming function with a complete UI interface.
Anchor
Audience







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 TUILiveKit Demo source code from GitHub, or directly run the following command in the command line:
2. Open the TUICallKit 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 execute 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:

Start Live Broadcast

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.



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 live broadcast.
Anchor: Before entering
Anchor: Preview
Anchor: Live
Anchor: Room Info












3. Viewers join the live broadcast room.
Audience: Before entering
Audience: After entering