Skip to content

Commit bdccf9a

Browse files
reneechaiAbySwifter
authored andcommitted
[Android] release 4.2 version
1 parent 0608fc6 commit bdccf9a

473 files changed

Lines changed: 22532 additions & 8804 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: 125 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -2,28 +2,92 @@ 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 10
13+
versionName '7.3.0'
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+
IOA_APP_KEY : (project.findProperty('RTCUBE_IOA_APP_KEY') ?: ''),
28+
IOA_APP_ID : (project.findProperty('RTCUBE_IOA_APP_ID') ?: '')
29+
]
30+
}
31+
32+
signingConfigs {
33+
release {
34+
storeFile file("trtc.keystore")
35+
storePassword "tencent.com"
36+
keyAlias "tencent"
37+
keyPassword "tencent.com"
38+
}
1439
}
1540

1641
buildTypes {
1742
release {
43+
signingConfig signingConfigs.release
1844
minifyEnabled false
1945
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
2046
}
2147
}
2248

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

2993
compileOptions {
@@ -32,24 +96,58 @@ android {
3296
}
3397

3498
kotlinOptions {
35-
jvmTarget = JavaVersion.VERSION_17
99+
jvmTarget = '17'
100+
}
101+
102+
lint {
103+
error 'RtlHardcoded'
104+
error 'RtlCompat'
105+
error 'RtlEnabled'
36106
}
37107
}
38108

39109
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-
}
110+
implementation project(':login')
111+
implementation project(':assembly')
112+
113+
implementation libs.androidx.core.ktx
114+
implementation libs.androidx.appcompat
115+
implementation libs.androidx.activity.ktx
116+
implementation libs.androidx.fragment.ktx
117+
implementation libs.androidx.constraintlayout
118+
implementation libs.material
119+
120+
implementation libs.lifecycle.runtime.ktx
121+
122+
implementation libs.kotlinx.coroutines.android
123+
124+
implementation libs.okhttp
125+
implementation libs.okhttp.logging
126+
implementation libs.retrofit
127+
implementation libs.retrofit.serialization
128+
implementation libs.retrofit.gson
129+
130+
implementation libs.kotlinx.serialization.json
131+
132+
implementation libs.coil
133+
implementation libs.coil.compose
134+
135+
implementation platform(libs.compose.bom)
136+
implementation libs.compose.ui
137+
implementation libs.compose.ui.tooling.preview
138+
implementation libs.compose.material3
139+
implementation libs.compose.foundation
140+
implementation libs.compose.runtime
141+
implementation libs.activity.compose
142+
implementation libs.lifecycle.viewmodel.compose
143+
implementation libs.lifecycle.runtime.compose
144+
implementation libs.navigation.compose
145+
debugImplementation libs.compose.ui.tooling
146+
implementation 'com.journeyapps:zxing-android-embedded:4.3.0'
147+
148+
debugImplementation libs.leakcanary
149+
implementation rootProject.ext.featureDelivery
150+
151+
// TIMPush
152+
implementation 'com.tencent.timpush:timpush:latest.release'
153+
}

0 commit comments

Comments
 (0)