Skip to content

Commit 0adcdff

Browse files
authored
Merge pull request #137 from AgoraIO/dev/3.0.0_conflict
Dev/3.0.0 conflict
2 parents ebf8629 + f006cec commit 0adcdff

File tree

535 files changed

+12398
-15048
lines changed

Some content is hidden

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

535 files changed

+12398
-15048
lines changed

Group-Video/OpenVideoCall-Android/.gitignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
include
2+
agora-rtc-sdk.jar
3+
*.so
4+
.settings
5+
16
# built application files
27
*.apk
38
*.ap_

Group-Video/OpenVideoCall-Android/README.md

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,9 @@ With this sample app, you can:
99
- Mute / unmute audio
1010
- Enable / disable video
1111
- Switch camera
12-
- Send message to channel
1312
- Setup resolution, frame rate and bit rate
1413
- Enable encryption
15-
- Enable / disable black and white filter
14+
- Enable beautify filter
1615

1716
## Prerequisites
1817

@@ -53,7 +52,7 @@ The SDK must be integrated into the sample project before it can opened and buil
5352
...
5453
dependencies {
5554
...
56-
implementation 'io.agora.rtc:full-sdk:2.4.1'
55+
implementation 'io.agora.rtc:full-sdk:3.0.0'
5756
}
5857
```
5958

@@ -81,8 +80,13 @@ Or use `Gradle` to build and run.
8180

8281
## Resources
8382

84-
- You can find full API document at [Document Center](https://docs.agora.io/en/)
85-
- You can file bugs about this demo at [issue](https://github.com/AgoraIO/Basic-Video-Call/issues)
83+
- For potential issues, take a look at our [FAQ](https://docs.agora.io/cn/faq) first
84+
- Dive into [Agora SDK Samples](https://github.com/AgoraIO) to see more tutorials
85+
- Take a look at [Agora Use Case](https://github.com/AgoraIO-usecase) for more complicated real use case
86+
- Repositories managed by developer communities can be found at [Agora Community](https://github.com/AgoraIO-Community)
87+
- You can find full API documentation at [Document Center](https://docs.agora.io/en/)
88+
- If you encounter problems during integration, you can ask question in [Stack Overflow](https://stackoverflow.com/questions/tagged/agora.io)
89+
- You can file bugs about this sample at [issue](https://github.com/AgoraIO/Basic-Video-Call/issues)
8690

8791
## License
8892

Group-Video/OpenVideoCall-Android/README.yaml

Lines changed: 0 additions & 52 deletions
This file was deleted.

Group-Video/OpenVideoCall-Android/README.zh.md

Lines changed: 11 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,9 @@
1010
- 静音和解除静音;
1111
- 关闭摄像头和打开摄像头;
1212
- 切换前置摄像头和后置摄像头;
13-
- 发送频道内消息;
1413
- 选择分辨率、码率和帧率;
1514
- 设置加密模式;
16-
- 开启和关闭黑白滤镜;
17-
18-
你也可以在这里查看入门版的示例项目:[Agora-Android-Tutorial-1to1](https://github.com/AgoraIO/Basic-Video-Call/tree/master/One-to-One-Video/Agora-Android-Tutorial-1to1)
15+
- 开启和关闭基础美颜;
1916

2017
## 环境准备
2118

@@ -46,14 +43,12 @@
4643
### 集成 Agora 视频 SDK
4744

4845
集成方式有以下两种:
49-
- 首选集成方式
46+
- 通过JCenter集成
5047
- 在项目对应的模块的 `app/build.gradle` 文件的依赖属性中加入通过 JCenter 自动集成 Agora 视频 SDK 的地址:
5148
```
52-
implementation 'io.agora.rtc:full-sdk:2.4.1'
49+
implementation 'io.agora.rtc:full-sdk:3.0.0'
5350
```
54-
(如果要在自己的应用中集成 Agora 视频 SDK,添加链接地址是最重要的一步。)
55-
- 在 [Agora.io SDK](https://www.agora.io/cn/download/) 下载 **视频通话 + 直播 SDK**,解压后将其中的 **libs**/**include** 文件夹下的 ***.h** 复制到本项目的 **app**/**src**/**main**/**cpp**/**agora** 下。
56-
- 次选集成方式:
51+
- 手动集成:
5752
- 在 [Agora.io SDK](https://www.agora.io/cn/download/) 下载 **视频通话 + 直播 SDK**并解压,按以下对应关系将 **libs** 目录的内容复制到项目内。
5853
5954
SDK目录|项目目录
@@ -62,6 +57,7 @@
6257
**arm64-v8a** folder|**/app/src/main/jniLibs** folder
6358
**x86** folder|**/app/src/main/jniLibs** folder
6459
**armeabi-v7a** folder|**/app/src/main/jniLibs** folder
60+
- 若需要需要使用C++头文件,可以在解压SDK后将其中的 **libs**/**include** 文件夹下的 ***.h** 复制到本项目的 **app**/**src**/**main**/**cpp**/**agora** 下。
6561
6662
6763
### 启动应用程序
@@ -73,11 +69,13 @@
7369
7470
## 联系我们
7571
72+
- 如果你遇到了困难,可以先参阅[常见问题](https://docs.agora.io/cn/faq)
73+
- 如果你想了解更多官方示例,可以参考[官方SDK示例](https://github.com/AgoraIO)
74+
- 如果你想了解声网SDK在复杂场景下的应用,可以参考[官方场景案例](https://github.com/AgoraIO-usecase)
75+
- 如果你想了解声网的一些社区开发者维护的项目,可以查看[社区](https://github.com/AgoraIO-Community)
7676
- 完整的 API 文档见 [文档中心](https://docs.agora.io/cn/)
77-
- 如果在集成中遇到问题, 你可以到 [开发者社区](https://dev.agora.io/cn/) 提问
78-
- 如果有售前咨询问题, 可以拨打 400 632 6626,或加入官方Q群 12742516 提问
79-
- 如果需要售后技术支持, 你可以在 [Agora Dashboard](https://dashboard.agora.io) 提交工单
80-
- 如果发现了示例代码的 bug, 欢迎提交 [issue](https://github.com/AgoraIO/Basic-Video-Call/issues)
77+
- 若遇到问题需要开发者帮助,你可以到 [开发者社区](https://rtcdeveloper.com/) 提问
78+
- 如果发现了示例代码的 bug,欢迎提交 [issue](https://github.com/AgoraIO/Basic-Video-Call/issues)
8179
8280
## 代码许可
8381

Group-Video/OpenVideoCall-Android/README.zh.yaml

Lines changed: 0 additions & 54 deletions
This file was deleted.

Group-Video/OpenVideoCall-Android/app/build.gradle

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,12 +45,14 @@ dependencies {
4545
implementation 'com.android.support:appcompat-v7:28.0.0'
4646
implementation 'com.android.support:support-v4:28.0.0'
4747
implementation 'com.android.support:design:28.0.0'
48-
implementation 'org.slf4j:slf4j-api:1.7.21'
48+
implementation 'org.slf4j:slf4j-api:1.7.25'
4949
implementation 'com.github.tony19:logback-android-core:1.1.1-4'
5050
implementation('com.github.tony19:logback-android-classic:1.1.1-4') {
5151
// workaround issue #73
5252
exclude group: 'com.google.android', module: 'android'
5353
}
54+
55+
implementation 'io.agora.rtc:full-sdk:2.9.2'
5456
androidTestImplementation 'com.android.support.test:rules:1.0.2'
5557
androidTestImplementation 'com.jayway.android.robotium:robotium-solo:5.6.3'
5658
}
Lines changed: 60 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,78 @@
11
package io.agora.openvcall;
22

33
import android.app.Application;
4+
import android.content.Context;
5+
import android.text.TextUtils;
6+
import android.util.Log;
7+
8+
import org.slf4j.Logger;
9+
import org.slf4j.LoggerFactory;
10+
11+
import io.agora.openvcall.model.AGEventHandler;
412
import io.agora.openvcall.model.CurrentUserSettings;
5-
import io.agora.openvcall.model.WorkerThread;
13+
import io.agora.openvcall.model.EngineConfig;
14+
import io.agora.openvcall.model.MyEngineEventHandler;
15+
import io.agora.rtc.Constants;
16+
import io.agora.rtc.RtcEngine;
617

718
public class AGApplication extends Application {
19+
private CurrentUserSettings mVideoSettings = new CurrentUserSettings();
820

9-
private WorkerThread mWorkerThread;
21+
private final Logger log = LoggerFactory.getLogger(this.getClass());
22+
private RtcEngine mRtcEngine;
23+
private EngineConfig mConfig;
24+
private MyEngineEventHandler mEventHandler;
1025

11-
public synchronized void initWorkerThread() {
12-
if (mWorkerThread == null) {
13-
mWorkerThread = new WorkerThread(getApplicationContext());
14-
mWorkerThread.start();
26+
public RtcEngine rtcEngine() {
27+
return mRtcEngine;
28+
}
1529

16-
mWorkerThread.waitForReady();
17-
}
30+
public EngineConfig config() {
31+
return mConfig;
32+
}
33+
34+
public CurrentUserSettings userSettings() {
35+
return mVideoSettings;
36+
}
37+
38+
public void addEventHandler(AGEventHandler handler) {
39+
mEventHandler.addEventHandler(handler);
1840
}
1941

20-
public synchronized WorkerThread getWorkerThread() {
21-
return mWorkerThread;
42+
public void remoteEventHandler(AGEventHandler handler) {
43+
mEventHandler.removeEventHandler(handler);
2244
}
2345

24-
public synchronized void deInitWorkerThread() {
25-
mWorkerThread.exit();
46+
@Override
47+
public void onCreate() {
48+
super.onCreate();
49+
createRtcEngine();
50+
}
51+
52+
private void createRtcEngine() {
53+
Context context = getApplicationContext();
54+
String appId = context.getString(R.string.agora_app_id);
55+
if (TextUtils.isEmpty(appId)) {
56+
throw new RuntimeException("NEED TO use your App ID, get your own ID at https://dashboard.agora.io/");
57+
}
58+
59+
mEventHandler = new MyEngineEventHandler();
2660
try {
27-
mWorkerThread.join();
28-
} catch (InterruptedException e) {
29-
e.printStackTrace();
61+
mRtcEngine = RtcEngine.create(context, appId, mEventHandler);
62+
} catch (Exception e) {
63+
log.error(Log.getStackTraceString(e));
64+
throw new RuntimeException("NEED TO check rtc sdk init fatal error\n" + Log.getStackTraceString(e));
3065
}
31-
mWorkerThread = null;
66+
67+
mRtcEngine.setChannelProfile(Constants.CHANNEL_PROFILE_COMMUNICATION);
68+
mRtcEngine.enableVideo();
69+
mRtcEngine.enableAudioVolumeIndication(200, 3, false);
70+
71+
mConfig = new EngineConfig();
3272
}
3373

34-
public static final CurrentUserSettings mVideoSettings = new CurrentUserSettings();
74+
@Override
75+
public void onTerminate() {
76+
super.onTerminate();
77+
}
3578
}

Group-Video/OpenVideoCall-Android/app/src/main/java/io/agora/openvcall/model/EngineConfig.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,6 @@ public void reset() {
99
mChannel = null;
1010
}
1111

12-
EngineConfig() {
12+
public EngineConfig() {
1313
}
1414
}

0 commit comments

Comments
 (0)