Skip to content

Commit 38ea3b5

Browse files
author
reneechai
committed
[Android][App]Release uikit 4.1.0 application
1 parent 7d42a8d commit 38ea3b5

456 files changed

Lines changed: 21697 additions & 8799 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

application/.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,3 +14,6 @@
1414
.cxx
1515
local.properties
1616
.idea/
17+
app/build/
18+
login/build/
19+
assembly/build/

application/README.cn.md

Lines changed: 95 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,95 @@
1+
# RTCube
2+
3+
[English](README.md) | 简体中文
4+
5+
## 概述
6+
7+
RTCube 是一款功能强大的 UI 组件库,它基于腾讯云 `AtomicXCore` SDK 构建。`AtomicXCore` 整合了腾讯云实时音视频(TRTC)、即时通信(IM)、音视频通话(TUICallEngine) 和房间管理(TUIRoomEngine) 的核心能力,提供了状态驱动的(State-driven)API 设计。
8+
9+
RTCube 在 `AtomicXCore` 提供的核心能力之上,为您提供了一套预制的用户界面(UI),使您无需关心复杂的后端逻辑和状态管理,即可快速为您的 Android 应用集成视频互动直播、语音聊天室、音视频通话等功能。
10+
11+
## 功能特性
12+
13+
RTCube 基于 `AtomicXCore` 提供了以下核心业务场景的完整 UI 实现:
14+
15+
* **视频/语音直播 (Live Streaming):**
16+
17+
* **直播列表管理:** 拉取直播列表。
18+
* **开播与观看:** 创建直播间、加入直播。
19+
* **麦位管理:** 支持麦位管理,观众上麦/下麦。
20+
* **主播连麦 (Co-hosting):** 支持主播与主播(跨房)连麦。
21+
* **主播 PK (Battle):** 支持主播间 PK 互动。
22+
* **互动功能:**
23+
* **礼物:** 支持发送和接收礼物。
24+
* **点赞:** 支持直播间点赞。
25+
* **弹幕:** 支持发送和接收弹幕消息。
26+
27+
* **音视频通话 (Calling):**
28+
29+
* **基础通话:** 支持 1v1 及多人音视频通话。
30+
* **通话管理:** 支持接听、拒绝、挂断。
31+
* **设备管理:** 支持通话中的摄像头和麦克风控制。
32+
* **通话记录:** 支持查询和删除通话记录。
33+
34+
* **多人会议 (Room):**
35+
36+
* **快速会议:** 支持一键创建/加入多人会议。
37+
* **邀请入会:** 支持邀请成员加入当前会议。
38+
* **会中管控:** 支持主持人对成员的音视频、麦位、成员列表进行管理。
39+
* **共享屏幕:** 支持会中屏幕共享。
40+
41+
## 快速开始
42+
43+
### 1. 环境准备
44+
45+
* Android Studio Giraffe (2022.3.1) 或更高版本
46+
* JDK 17
47+
* Android Gradle Plugin 8.x
48+
* Android 7.0(API 24)或更高版本
49+
50+
### 2. 克隆仓库
51+
52+
```bash
53+
git clone https://github.com/Tencent-RTC/TUIKit_Android.git
54+
```
55+
56+
### 3. 打开工程
57+
58+
使用 Android Studio 打开 `TUIKit_Android/application` 目录,等待 Gradle 同步完成。 `settings.gradle` 中接入了 `tuilivekit``tuicallkit-kt``tuiroomkit` 等必要的 AtomicXCore 组件模块。
59+
60+
### 4. 运行项目
61+
62+
打开 `application/app/src/main/kotlin/com/tencent/rtcube/v2/debug/GenerateTestUserSig.kt`,填入您自己的腾讯云 `SDKAPPID``SECRETKEY`,然后编译并运行 `app` 模块。
63+
64+
## 架构
65+
66+
`RTCube` 的架构设计遵循分层原则:
67+
68+
1. **TUILiveKit / TUICallKit / TUIRoomKit (UI 层):**
69+
70+
* 提供预制的、可复用的 UI 组件。
71+
* 负责视图(View)的展示和用户交互。
72+
* 订阅 `AtomicXCore` 中的 `Store` 来获取状态并更新 UI。
73+
* 调用 `AtomicXCore` 中的 `Store` 方法来响应用户操作。
74+
75+
2. **AtomicXCore (核心层):**
76+
77+
* **Stores:** (如 `LiveListStore`, `CallListStore`, `ConversationListStore`) 负责管理业务逻辑和状态(State)。
78+
* **Core Views:** (如 `LiveCoreView`, `ParticipantView`) 提供了驱动视频渲染的无 UI 视图容器。
79+
* **Engine 封装:** 封装了底层的 `RTCRoomEngine`, `TUICallEngine``IMSDK`,提供统一的 API。
80+
81+
3. **Tencent Cloud SDK (引擎层):**
82+
83+
* `RTCRoomEngine` & `TUICallEngine`: 提供底层的实时音视频能力。
84+
* `IMSDK`: 提供即时通讯能力。
85+
86+
## 文档
87+
88+
* [AtomicXCore 文档](https://tencent-rtc.github.io/TUIKit_Android/documentation/atomicxcore)
89+
* [官方文档 - 快速集成指南](https://cloud.tencent.com/document/product/647/106536)
90+
91+
## 许可证
92+
93+
本项目遵循 [MIT 许可证](https://www.google.com/search?q=LICENSE)
94+
95+
-----

application/README.md

Lines changed: 95 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,95 @@
1+
# RTCube
2+
3+
English | [简体中文](README.cn.md)
4+
5+
## Overview
6+
7+
RTCube is a powerful UI component library built on top of the Tencent Cloud `AtomicXCore` SDK. `AtomicXCore` consolidates the core capabilities of Tencent Cloud Real-Time Communication (TRTC), Instant Messaging (IM), Audio/Video Calling (TUICallEngine), and Room Management (TUIRoomEngine), offering a state-driven API design.
8+
9+
On top of the core capabilities provided by `AtomicXCore`, RTCube delivers a set of ready-to-use user interfaces (UI), allowing you to quickly integrate interactive video live streaming, voice chat rooms, audio/video calling, and more into your Android application—without worrying about complex backend logic or state management.
10+
11+
## Features
12+
13+
Based on `AtomicXCore`, RTCube provides complete UI implementations for the following core business scenarios:
14+
15+
* **Video/Voice Live Streaming:**
16+
17+
* **Live List Management:** Fetch the list of live streams.
18+
* **Go Live & Watch:** Create live rooms and join live streams.
19+
* **Seat Management:** Manage seats; audience members can take or leave the mic.
20+
* **Co-hosting:** Support cross-room co-hosting between hosts.
21+
* **Host Battle (PK):** Support interactive PK between hosts.
22+
* **Interactive Features:**
23+
* **Gifts:** Send and receive gifts.
24+
* **Likes:** Send likes in the live room.
25+
* **Barrage (Danmaku):** Send and receive barrage messages.
26+
27+
* **Audio/Video Calling:**
28+
29+
* **Basic Calls:** Support 1v1 and multi-party audio/video calls.
30+
* **Call Management:** Support answering, rejecting, and hanging up calls.
31+
* **Device Management:** Control the camera and microphone during calls.
32+
* **Call History:** Query and delete call records.
33+
34+
* **Multi-party Meetings (Room):**
35+
36+
* **Quick Meetings:** One-click creation and joining of multi-party meetings.
37+
* **Invite to Meeting:** Invite members to join the current meeting.
38+
* **In-meeting Controls:** Hosts can manage members' audio/video, seats, and member list.
39+
* **Screen Sharing:** Support screen sharing during meetings.
40+
41+
## Quick Start
42+
43+
### 1. Prerequisites
44+
45+
* Android Studio Giraffe (2022.3.1) or later
46+
* JDK 17
47+
* Android Gradle Plugin 8.x
48+
* Android 7.0 (API 24) or later
49+
50+
### 2. Clone the Repository
51+
52+
```bash
53+
git clone https://github.com/Tencent-RTC/TUIKit_Android.git
54+
```
55+
56+
### 3. Open the Project
57+
58+
Open `TUIKit_Android/application` with Android Studio and let Gradle sync the dependencies. All required AtomicXCore component modules (`tuilivekit`, `tuicallkit-kt`, `tuiroomkit`, etc.) are wired in through the top-level `settings.gradle`.
59+
60+
### 4. Configure & Run
61+
62+
Open `application/app/src/main/kotlin/com/tencent/rtcube/v2/debug/GenerateTestUserSig.kt`, fill in your Tencent Cloud `SDKAPPID` and `SECRETKEY`, then run the `app` module.
63+
64+
## Architecture
65+
66+
The architecture of `RTCube` follows a layered design:
67+
68+
1. **TUILiveKit / TUICallKit / TUIRoomKit (UI Layer):**
69+
70+
* Provides prebuilt, reusable UI components.
71+
* Handles view presentation and user interaction.
72+
* Subscribes to `Store`s in `AtomicXCore` to retrieve state and update the UI.
73+
* Calls `Store` methods in `AtomicXCore` to respond to user actions.
74+
75+
2. **AtomicXCore (Core Layer):**
76+
77+
* **Stores:** (e.g., `LiveListStore`, `CallListStore`, `ConversationListStore`) Manage business logic and state.
78+
* **Core Views:** (e.g., `LiveCoreView`, `ParticipantView`) Provide UI-less view containers that drive video rendering.
79+
* **Engine Wrappers:** Wrap the underlying `RTCRoomEngine`, `TUICallEngine`, and `IMSDK`, providing a unified API.
80+
81+
3. **Tencent Cloud SDK (Engine Layer):**
82+
83+
* `RTCRoomEngine` & `TUICallEngine`: Provide low-level real-time audio/video capabilities.
84+
* `IMSDK`: Provides instant messaging capabilities.
85+
86+
## Documentation
87+
88+
* [AtomicXCore Documentation](https://tencent-rtc.github.io/TUIKit_Android/documentation/atomicxcore)
89+
* [Official Documentation - Quick Integration Guide](https://cloud.tencent.com/document/product/647/106536)
90+
91+
## License
92+
93+
This project is licensed under the [MIT License](https://www.google.com/search?q=LICENSE).
94+
95+
-----

application/app/.gitignore

Lines changed: 0 additions & 1 deletion
This file was deleted.

application/app/build.gradle

Lines changed: 122 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -2,28 +2,90 @@ apply plugin: 'com.android.application'
22
apply plugin: 'kotlin-android'
33

44
android {
5-
namespace 'com.tencent.uikit.app'
5+
namespace 'com.tencent.rtcube.v2'
66
compileSdk 34
77

88
defaultConfig {
9-
applicationId "com.trtc.uikit.livekit.example"
10-
minSdkVersion 21
11-
targetSdkVersion 34
12-
versionCode 1
13-
versionName "1.0"
9+
applicationId 'com.tencent.trtc'
10+
minSdk 24
11+
targetSdk 34
12+
versionCode = ((project.findProperty('RTCUBE_VERSION_CODE') ?: '2') as String).toInteger()
13+
versionName = (project.findProperty('RTCUBE_VERSION_NAME') ?: '2.0.0').toString()
14+
testInstrumentationRunner 'androidx.test.runner.AndroidJUnitRunner'
15+
16+
ndk {
17+
abiFilters 'arm64-v8a', 'armeabi-v7a'
18+
}
19+
20+
manifestPlaceholders = [
21+
// ioa party name, used for IOA integration; values injected from gradle.properties
22+
ACCESS_PARTY_NAME: 'com_tencent_trtc',
23+
// vivo / honor push identifier, used for TIMPush integration; values injected from gradle.properties
24+
VIVO_APPKEY : (project.findProperty('RTCUBE_VIVO_APPKEY') ?: ''),
25+
VIVO_APPID : (project.findProperty('RTCUBE_VIVO_APPID') ?: ''),
26+
HONOR_APPID : (project.findProperty('RTCUBE_HONOR_APPID') ?: '')
27+
]
28+
}
29+
30+
signingConfigs {
31+
release {
32+
storeFile file("trtc.keystore")
33+
storePassword "tencent.com"
34+
keyAlias "tencent"
35+
keyPassword "tencent.com"
36+
}
1437
}
1538

1639
buildTypes {
1740
release {
41+
signingConfig signingConfigs.release
1842
minifyEnabled false
1943
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
2044
}
2145
}
2246

23-
packagingOptions {
24-
exclude '/META-INF/{AL2.0,LGPL2.1}'
25-
exclude 'META-INF/LICENSE.txt'
26-
exclude 'META-INF/NOTICE.txt'
47+
flavorDimensions "channel"
48+
productFlavors {
49+
xiaomi {
50+
dimension "channel"
51+
applicationId "com.tencent.trtc"
52+
}
53+
rtcube {
54+
dimension "channel"
55+
applicationId "com.tencent.trtc"
56+
}
57+
tencentrtc {
58+
dimension "channel"
59+
applicationId "com.tencent.rtc.app"
60+
}
61+
rtcubelab {
62+
dimension "channel"
63+
applicationId "com.tencent.trtc"
64+
isDefault true
65+
}
66+
}
67+
68+
sourceSets {
69+
main {
70+
res.srcDirs(
71+
'src/main/res',
72+
'src/main/res-main',
73+
'src/main/res-mine',
74+
'src/main/res-privacy',
75+
'src/main/res-overseas'
76+
)
77+
}
78+
}
79+
80+
buildFeatures {
81+
viewBinding true
82+
dataBinding true
83+
buildConfig true
84+
compose true
85+
}
86+
87+
composeOptions {
88+
kotlinCompilerExtensionVersion '1.5.8'
2789
}
2890

2991
compileOptions {
@@ -32,24 +94,57 @@ android {
3294
}
3395

3496
kotlinOptions {
35-
jvmTarget = JavaVersion.VERSION_17
97+
jvmTarget = '17'
98+
}
99+
100+
lint {
101+
error 'RtlHardcoded'
102+
error 'RtlCompat'
103+
error 'RtlEnabled'
36104
}
37105
}
38106

39107
dependencies {
40-
api project(':tuicallkit-kt')
41-
api project(':tuilivekit')
42-
api project(':tuiroomkit')
43-
api rootProject.getProperties().containsKey("common") ? rootProject.ext.common : "io.trtc.uikit:common:3.3.0.1194"
44-
api project(':debug')
45-
46-
implementation("androidx.core:core:1.13.0")
47-
implementation("androidx.appcompat:appcompat:1.6.1")
48-
implementation "androidx.navigation:navigation-fragment:2.1.0"
49-
implementation 'androidx.appcompat:appcompat:1.3.1'
50-
implementation 'androidx.cardview:cardview:1.0.0'
51-
debugImplementation 'com.squareup.leakcanary:leakcanary-android:2.14'
52-
53-
androidTestImplementation libs.androidx.junit
54-
androidTestImplementation libs.androidx.espresso.core
55-
}
108+
implementation project(':login')
109+
implementation project(':assembly')
110+
111+
implementation libs.androidx.core.ktx
112+
implementation libs.androidx.appcompat
113+
implementation libs.androidx.activity.ktx
114+
implementation libs.androidx.fragment.ktx
115+
implementation libs.androidx.constraintlayout
116+
implementation libs.material
117+
118+
implementation libs.lifecycle.runtime.ktx
119+
120+
implementation libs.kotlinx.coroutines.android
121+
122+
implementation libs.okhttp
123+
implementation libs.okhttp.logging
124+
implementation libs.retrofit
125+
implementation libs.retrofit.serialization
126+
implementation libs.retrofit.gson
127+
128+
implementation libs.kotlinx.serialization.json
129+
130+
implementation libs.coil
131+
implementation libs.coil.compose
132+
133+
implementation platform(libs.compose.bom)
134+
implementation libs.compose.ui
135+
implementation libs.compose.ui.tooling.preview
136+
implementation libs.compose.material3
137+
implementation libs.compose.foundation
138+
implementation libs.compose.runtime
139+
implementation libs.activity.compose
140+
implementation libs.lifecycle.viewmodel.compose
141+
implementation libs.lifecycle.runtime.compose
142+
implementation libs.navigation.compose
143+
debugImplementation libs.compose.ui.tooling
144+
implementation 'com.journeyapps:zxing-android-embedded:4.3.0'
145+
146+
debugImplementation libs.leakcanary
147+
148+
// TIMPush
149+
implementation 'com.tencent.timpush:timpush:latest.release'
150+
}

0 commit comments

Comments
 (0)