tencent cloud

Tencent Real-Time Communication

お知らせ・リリースノート
製品アップデート情報
Tencent Cloudオーディオビデオ端末SDKの再生アップグレードおよび承認チェック追加に関するお知らせ
TRTCアプリケーションのサブスクリプションパッケージサービスのリリースに関する説明について
製品の説明
製品概要
基礎概念
製品の機能
製品の強み
ユースケース
性能データ
購入ガイド
Billing Overview
無料時間の説明
Monthly subscription
Pay-as-you-go
TRTC Overdue and Suspension Policy
課金に関するよくあるご質問
Refund Instructions
初心者ガイド
Demo体験
Call
コンポーネントの説明(TUICallKit)
Activate the Service
Run Demo
クイック導入
オフライン通知
Conversational Chat
クラウドレコーディング(TUICallKit)
AI Noise Reduction
インターフェースのカスタマイズ
Calls integration to Chat
Additional Features
No UI Integration
Server APIs
Client APIs
Solution
ErrorCode
公開ログ
よくある質問
ライブ配信
Billing of Video Live Component
Overview
Activating the Service (TUILiveKit)
Demo のクイックスタート
No UI Integration
UI Customization
Live Broadcast Monitoring
Video Live Streaming
Voice Chat Room
Advanced Features
Client APIs
Server APIs
Error Codes
Release Notes
FAQs
RTC Engine
Activate Service
SDKのダウンロード
APIコードサンプル
Usage Guidelines
クライアント側 API
高度な機能
RTC RESTFUL API
History
Introduction
API Category
Room Management APIs
Stream mixing and relay APIs
On-cloud recording APIs
Data Monitoring APIs
Pull stream Relay Related interface
Web Record APIs
AI Service APIs
Cloud Slicing APIs
Cloud Moderation APIs
Making API Requests
Call Quality Monitoring APIs
Usage Statistics APIs
Data Types
Appendix
Error Codes
コンソールガイド
アプリケーション管理
使用統計
監視ダッシュボード
開発支援
Solution
Real-Time Chorus
よくあるご質問
課金関連問題
機能関連
UserSig関連
ファイアウォールの制限の対応関連
インストールパッケージの圧縮に関するご質問
AndriodおよびiOS関連
Web端末関連
Flutter関連
Electron関連
TRTCCalling Web関連
オーディオビデオ品質関連
その他のご質問
旧バージョンのドキュメント
TUIRoom(Web)の統合
TUIRoom (Android)の統合
TUIRoom (iOS)の統合
TUIRoom (Flutter)の統合
TUIRoom (Electron)の統合
TUIRoom APIのクエリー
クラウドレコーディングと再生の実現(旧)
Protocols and Policies
セキュリティコンプライアンス認証
セキュリティホワイトペーパー
情報セキュリティの説明
Service Level Agreement
Apple Privacy Policy: PrivacyInfo.xcprivacy
TRTC ポリシー
プライバシーポリシー
データ処理とセキュリティ契約
用語集

Live Stream List(Android)

PDF
フォーカスモード
フォントサイズ
最終更新日: 2025-11-17 20:32:56

Feature Overview

This document provides a comprehensive introduction to the Voice Chat Room Live List Page in TUILiveKit. Use this guide to quickly integrate our pre-built live list page into your project, or to deeply customize the page’s style, layout, and features to fit your requirements.


Quick Integration

Integrate the Component

Follow the Prerequisites to integrate TUILiveKit into your project.

Add the LiveListView

The voice chat room scenario currently supports only a two-column waterfall layout.
import android.content.Context
import android.os.Bundle
import androidx.appcompat.app.AppCompatActivity
import com.trtc.uikit.livekit.features.livelist.LiveListView
import com.trtc.uikit.livekit.features.livelist.Style

class YourActivity : AppCompatActivity() {
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
// 1. Create and initialize the waterfall view
val view = createLiveListView(this)
// 2. Add the LiveListView to your Activity or Fragment
setContentView(view)
}

fun createLiveListView(context: Context): LiveListView {
val liveListView = LiveListView(context)
// Initialize with a double-column waterfall layout
liveListView.init(this, Style.DOUBLE_COLUMN)
return liveListView
}
}

Enable Navigation from Live List to Audience Watch Page

The live list handles click events through the OnItemClickListener callback. Implement OnItemClickListener on the live list view to handle user clicks, and navigate to the audience watch page within onItemClick. For details on implementing the audience watch page, see Audience Watching.
Interaction Example:

Code Example:
fun createLiveListView(context: Context): LiveListView {
val liveListView = LiveListView(context)
// Initialize with a double-column waterfall layout
liveListView.init(this, Style.DOUBLE_COLUMN)

liveListView.setOnItemClickListener { view, liveInfo ->
// Navigate to the audience watch page when a list item is clicked
val intent = Intent(context, YourAudienceActivity::class.java)
intent.putExtra("liveId", liveInfo.roomId)
context.startActivity(intent)
}
return liveListView
}

Customize UI

TUILiveKit provides flexible APIs for customizing the live list waterfall component. You can customize the data source and the appearance of list items to fit your business needs.

Custom Data Source

If your backend provides a custom live list data source, implement the LiveListDataSource interface to supply your own data instead of using the default component data.
// 1. Import dependencies
import com.trtc.uikit.livekit.features.livelist.LiveListDataSource;

// 2. Implement LiveListDataSource to provide a custom data source
val dataSource = object : LiveListDataSource {
override fun fetchLiveList(param: FetchLiveListParam, callback: LiveListCallback) {
// Connect to your backend and return data in the required format
val liveInfoList = mutableListOf<TUILiveListManager.LiveInfo>()
val liveInfo = TUILiveListManager.LiveInfo().apply {
roomInfo = TUIRoomDefine.RoomInfo().apply {
roomId = "live_123456"
name = "live_123456"
}
}
liveInfoList.add(liveInfo)
val cursor = "aabbccdd"
callback.onSuccess(cursor, liveInfoList)
}
}

// 3. Pass the custom dataSource during initialization
liveListView.init(this, Style.DOUBLE_COLUMN, dataSource = dataSource)

Custom View

By default, waterfall list items display the room cover. To customize UI elements at the top of list items (such as host avatar, live title, etc.), implement the LiveListViewAdapter interface.
// 1. Import dependencies
import com.trtc.uikit.livekit.features.livelist.LiveListViewAdapter;

// 2. Implement LiveListViewAdapter to customize widgets
val liveListViewAdapter = object : LiveListViewAdapter {
override fun createLiveInfoView(liveInfo: TUILiveListManager.LiveInfo): View {
// Create your custom widget view
val widgetView = YourView(context)
widgetView.init(liveInfo)
return widgetView
}

override fun updateLiveInfoView(view: View, liveInfo: TUILiveListManager.LiveInfo) {
// Update the widget view with new data
val widgetView = view as YourView
widgetView.updateLiveInfoView(liveInfo)
}
}

// 3. Pass the custom liveListViewAdapter during initialization
liveListView.init(this, Style.DOUBLE_COLUMN, adapter = liveListViewAdapter)

Next Steps

You have now successfully integrated the Live Stream List feature. Next, implement additional features such as Host Live Streaming and Audience Viewing. See the table below for details:
Feature
Description
Integration Guide
Host Live Streaming
Implements the complete process for a host to start a voice chat room live, including pre-live setup and in-session interactions.
Audience Viewing
Enables audience participation after joining the host’s voice chat room, including joining the mic, sending and receiving bullet comments, and more.

FAQs

Why are no live streams displayed after integrating the live list feature?

If the page is blank, verify that you have completed the login. To test, use two devices: start a live stream on one device, and use the other device to open the live list page. The live list will display any active live rooms.

What should I do if I use a custom data source (LiveListDataSource) but the list does not display or refresh?

Ensure you have correctly implemented the LiveListDataSource interface. Pay special attention to the following:
1. Confirm that the fetchLiveList method is being called.
2. Always call callback.onSuccess or callback.onFailure after fetching data, regardless of the result.
3. Verify that your backend returns data in the correct format.


ヘルプとサポート

この記事はお役に立ちましたか?

フィードバック