From 8d2956fc785e5f749c7836fae2b48a315cddafce Mon Sep 17 00:00:00 2001 From: weileifrank <1138289316@qq.com> Date: Tue, 10 Sep 2024 10:16:13 +0800 Subject: [PATCH 1/3] =?UTF-8?q?feat:=20=E5=A2=9E=E5=8A=A0=E4=BA=86android?= =?UTF-8?q?=20readme=E5=92=8C=E4=BB=A3=E7=A0=81=E8=8B=B1=E6=96=87=E8=AF=B4?= =?UTF-8?q?=E6=98=8E=E5=92=8C=E6=B3=A8=E9=87=8A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Agora-RTC-QuickStart-Android/README.md | 61 ++++++++++--------- .../Agora-RTC-QuickStart-Android/README.zh.md | 52 ++++++++++++++++ .../io/agora/quickstart/rtc/MainActivity.java | 30 +++++++-- 3 files changed, 109 insertions(+), 34 deletions(-) create mode 100644 Android/Agora-RTC-QuickStart-Android/README.zh.md diff --git a/Android/Agora-RTC-QuickStart-Android/README.md b/Android/Agora-RTC-QuickStart-Android/README.md index 9d4f253..58ae31e 100644 --- a/Android/Agora-RTC-QuickStart-Android/README.md +++ b/Android/Agora-RTC-QuickStart-Android/README.md @@ -1,50 +1,51 @@ # Agora-RTC-QuickStart -本示例介绍如何集成声网实时互动 SDK,通过少量代码从 0 开始实现一个简单的实时互动 App,适用于互动直播和视频通话场景。 +*English | [中文](README.zh.md)* -## 前提条件 +This example demonstrates how to integrate the Agora Real-Time Interactive SDK to create a simple real-time interactive app from scratch with minimal code, suitable for interactive live streaming and video calling scenarios. -在实现功能以前,请按照以下要求准备开发环境: +## Prerequisites -- Android Studio 4.1 以上版本。 -- Android API 级别 16 或以上。 -- 两台运行 Android 4.1 或以上版本的移动设备 -- 可以访问互联网的计算机。如果你的网络环境部署了防火墙,参考[应对防火墙限制](https://doc.shengwang.cn/doc/rtc/android/basic-features/firewall)以正常使用声网服务。 -- 一个有效的声网账号以及声网项目。请参考[开通服务](https://doc.shengwang.cn/doc/rtc/android/get-started/enable-service)从声网控制台获得以下信息: - - App ID:声网随机生成的字符串,用于识别你的项目。 - - 临时 Token:Token 也称为动态密钥,在客户端加入频道时对用户鉴权。临时 Token 的有效期为 24 小时。 +Before implementing the functionality, please prepare your development environment according to the following requirements: -## 运行示例程序 +- Android Studio version 4.1 or above. +- Android API level 16 or above. +- Two mobile devices running Android 4.1 or above. +- A computer with internet access. If your network environment has a firewall, refer to Dealing with [Firewall Restrictions](https://doc.shengwang.cn/doc/rtc/android/basic-features/firewall) to use Agora services normally. +- An active Agora account and an Agora project. Please refer to [Enabling Services](https://doc.shengwang.cn/doc/rtc/android/get-started/enable-service) to obtain the following information from the Agora Console: + - App ID:A randomly generated string by Agora to identify your project. + - Temporary Token: Also known as a dynamic key, used for user authentication when joining a channel. The temporary token is valid for 24 hours. -这个段落主要讲解了如何编译和运行实例程序。 +## Running the Sample Program -1. 进入到[后台](https://console.shengwang.cn/)项目里,复制后台的 **App Id** 并备注,稍后启动应用时会用到它 -2. (可选)如果开启安全模式,则使用[临时 token 生成器](https://docportal.shengwang.cn/cn/Agora%20Platform/get_appid_token?platform=All%20Platforms#%E8%8E%B7%E5%8F%96%E4%B8%B4%E6%97%B6-token)生成一个频道的RTC产品临时token,复制**频道名**和 **Token** 并备注,稍后启动应用时会用到它 -3. 编辑 `app/src/main/java/io/agora/quickstart/rtc/MainActivity.java`,将你的 AppID 、频道名、Token 分别替换到 `<#Your App ID#>` 、 `<#Your channel name#>`、`<#Your Token#>` +This section explains how to compile and run the sample program. + +1. Go to the [Console project](https://console.shengwang.cn/), copy the **App ID** from the backend, and make a note of it, as you will need it when launching the app later. +2. (Optional) If you enable security mode, use the [Temporary Token Generator](https://docportal.shengwang.cn/cn/Agora%20Platform/get_appid_token?platform=All%20Platforms#%E8%8E%B7%E5%8F%96%E4%B8%B4%E6%97%B6-token) to generate a temporary RTC token for a channel, and make a note of the **Channel Name** and **Token**, as you will need them when launching the app later. +3. Edit `app/src/main/java/io/agora/quickstart/rtc/MainActivity.java`, replacing `<#Your App ID#>`, `<#Your channel name#>`, and `<#Your Token#>` with your App ID, channel name, and token, respectively. ``` -// 填写项目的 App ID,可在声网控制台中生成 +// Enter the App ID for your project, which can be generated in the Agora Console private String appId = "<#Your App ID#>"; -// 填写频道名 +// Enter the channel name private String channelName = "<#Your channel name#>"; -// 填写声网控制台中生成的临时 Token +// Enter the temporary Token generated in the Agora Console private String token = "<#Your Token#>"; ``` -4. 使用Android Studio打开[Android/Agora-RTC-QuickStart-Android](.),等待下载依赖并同步成功 +4.Open [Android/Agora-RTC-QuickStart-Android](.) in Android Studio and wait for the dependencies to download and sync successfully. -然后你就可以编译并运行项目了。 +You can then compile and run the project. -## 联系我们 +## Contact Us -- 如果你遇到了困难,可以先参阅 [常见问题](https://docportal.shengwang.cn/cn/Real-time-Messaging/faq) -- 如果你想了解更多官方示例,可以参考 [官方SDK示例](https://github.com/AgoraIO) -- 如果你想了解声网SDK在复杂场景下的应用,可以参考 [官方场景案例](https://github.com/AgoraIO-usecase) -- 如果你想了解声网的一些社区开发者维护的项目,可以查看 [社区](https://github.com/AgoraIO-Community) -- 完整的 API 文档见 [文档中心](https://docportal.shengwang.cn/cn) -- 若遇到问题需要开发者帮助,你可以到 [开发者社区](https://rtcdeveloper.com/) 提问 -- 如果需要售后技术支持, 你可以在 [Agora Dashboard](https://dashboard.agora.io) 提交工单 -- 如果发现了示例代码的 bug,欢迎提交 [issue](https://github.com/AgoraIO-Community/Agora-RTC-QuickStart/issues) +- For potential issues, take a look at our [FAQ](https://docs.agora.io/en/faq) first +- Dive into [Agora SDK Samples](https://github.com/AgoraIO) to see more tutorials +- Take a look at [Agora Use Case](https://github.com/AgoraIO-usecase) for more complicated real use case +- Repositories managed by developer communities can be found at [Agora Community](https://github.com/AgoraIO-Community) +- You can find full API documentation at [Document Center](https://docs.agora.io/en/) +- If you encounter problems during integration, you can ask question in [Stack Overflow](https://stackoverflow.com/questions/tagged/agora.io) +- You can file bugs about this sample at [issue](https://github.com/AgoraIO/API-Examples/issues) -## 代码许可 +## License The MIT License (MIT) diff --git a/Android/Agora-RTC-QuickStart-Android/README.zh.md b/Android/Agora-RTC-QuickStart-Android/README.zh.md new file mode 100644 index 0000000..74fc29f --- /dev/null +++ b/Android/Agora-RTC-QuickStart-Android/README.zh.md @@ -0,0 +1,52 @@ +# Agora-RTC-QuickStart + +*[English](README.md) | 中文* + +本示例介绍如何集成声网实时互动 SDK,通过少量代码从 0 开始实现一个简单的实时互动 App,适用于互动直播和视频通话场景。 + +## 前提条件 + +在实现功能以前,请按照以下要求准备开发环境: + +- Android Studio 4.1 以上版本。 +- Android API 级别 16 或以上。 +- 两台运行 Android 4.1 或以上版本的移动设备 +- 可以访问互联网的计算机。如果你的网络环境部署了防火墙,参考[应对防火墙限制](https://doc.shengwang.cn/doc/rtc/android/basic-features/firewall)以正常使用声网服务。 +- 一个有效的声网账号以及声网项目。请参考[开通服务](https://doc.shengwang.cn/doc/rtc/android/get-started/enable-service)从声网控制台获得以下信息: + - App ID:声网随机生成的字符串,用于识别你的项目。 + - 临时 Token:Token 也称为动态密钥,在客户端加入频道时对用户鉴权。临时 Token 的有效期为 24 小时。 + +## 运行示例程序 + +这个段落主要讲解了如何编译和运行实例程序。 + +1. 进入到[后台](https://console.shengwang.cn/)项目里,复制后台的 **App Id** 并备注,稍后启动应用时会用到它 +2. (可选)如果开启安全模式,则使用[临时 token 生成器](https://docportal.shengwang.cn/cn/Agora%20Platform/get_appid_token?platform=All%20Platforms#%E8%8E%B7%E5%8F%96%E4%B8%B4%E6%97%B6-token)生成一个频道的RTC产品临时token,复制**频道名**和 **Token** 并备注,稍后启动应用时会用到它 +3. 编辑 `app/src/main/java/io/agora/quickstart/rtc/MainActivity.java`,将你的 AppID 、频道名、Token 分别替换到 `<#Your App ID#>` 、 `<#Your channel name#>`、`<#Your Token#>` + +``` +// 填写项目的 App ID,可在声网控制台中生成 +private String appId = "<#Your App ID#>"; +// 填写频道名 +private String channelName = "<#Your channel name#>"; +// 填写声网控制台中生成的临时 Token +private String token = "<#Your Token#>"; +``` +4. 使用Android Studio打开[Android/Agora-RTC-QuickStart-Android](.),等待下载依赖并同步成功 + +然后你就可以编译并运行项目了。 + +## 联系我们 + +- 如果你遇到了困难,可以先参阅 [常见问题](https://docportal.shengwang.cn/cn/Real-time-Messaging/faq) +- 如果你想了解更多官方示例,可以参考 [官方SDK示例](https://github.com/AgoraIO) +- 如果你想了解声网SDK在复杂场景下的应用,可以参考 [官方场景案例](https://github.com/AgoraIO-usecase) +- 如果你想了解声网的一些社区开发者维护的项目,可以查看 [社区](https://github.com/AgoraIO-Community) +- 完整的 API 文档见 [文档中心](https://docportal.shengwang.cn/cn) +- 若遇到问题需要开发者帮助,你可以到 [开发者社区](https://rtcdeveloper.com/) 提问 +- 如果需要售后技术支持, 你可以在 [Agora Dashboard](https://dashboard.agora.io) 提交工单 +- 如果发现了示例代码的 bug,欢迎提交 [issue](https://github.com/AgoraIO-Community/Agora-RTC-QuickStart/issues) + +## 代码许可 + +The MIT License (MIT) diff --git a/Android/Agora-RTC-QuickStart-Android/app/src/main/java/io/agora/quickstart/rtc/MainActivity.java b/Android/Agora-RTC-QuickStart-Android/app/src/main/java/io/agora/quickstart/rtc/MainActivity.java index 28b429a..c0bad7a 100644 --- a/Android/Agora-RTC-QuickStart-Android/app/src/main/java/io/agora/quickstart/rtc/MainActivity.java +++ b/Android/Agora-RTC-QuickStart-Android/app/src/main/java/io/agora/quickstart/rtc/MainActivity.java @@ -22,10 +22,13 @@ public class MainActivity extends AppCompatActivity { // 填写项目的 App ID,可在声网控制台中生成 + // Enter the App ID for your project, which can be generated in the Agora Console private String appId = "<#Your App ID#>"; // 填写频道名 + // Enter the channel name private String channelName = "<#Your channel name#>"; // 填写声网控制台中生成的临时 Token + // Enter the temporary Token generated in the Agora Console private String token = "<#Your Token#>"; @@ -42,9 +45,11 @@ public void onJoinChannelSuccess(String channel, int uid, int elapsed) { @Override // 监听频道内的远端用户,获取用户的 uid 信息 + //Listen to remote users in the channel and retrieve their UID information. public void onUserJoined(int uid, int elapsed) { runOnUiThread(() -> { // 获取 uid 后,设置远端视频视图 + // After obtaining the UID, set the remote video view. setupRemoteVideo(uid); }); } @@ -61,38 +66,48 @@ public void onUserOffline(int uid, int reason) { private void initializeAndJoinChannel() { try { // 创建 RtcEngineConfig 对象,并进行配置 + // Create and configure the RtcEngineConfig object RtcEngineConfig config = new RtcEngineConfig(); config.mContext = getBaseContext(); config.mAppId = appId; config.mEventHandler = mRtcEventHandler; // 创建并初始化 RtcEngine + // Create and initialize the RtcEngine mRtcEngine = RtcEngine.create(config); } catch (Exception e) { throw new RuntimeException("Check the error."); } // 启用视频模块 + // Enable the video module. mRtcEngine.enableVideo(); // 创建一个 SurfaceView 对象,并将其作为 FrameLayout 的子对象 + // Create a SurfaceView object and add it as a child to the FrameLayout FrameLayout container = findViewById(R.id.local_video_view_container); SurfaceView surfaceView = new SurfaceView (getBaseContext()); container.addView(surfaceView); // 将 SurfaceView 对象传入声网实时互动 SDK,设置本地视图 + // Pass the SurfaceView object to the Agora Real-Time Interactive SDK to set the local view. mRtcEngine.setupLocalVideo(new VideoCanvas(surfaceView, VideoCanvas.RENDER_MODE_FIT, 0)); // 开启本地预览 + // Start local preview mRtcEngine.startPreview(); // 创建 ChannelMediaOptions 对象,并进行配置 + // Create and configure the ChannelMediaOptions object ChannelMediaOptions options = new ChannelMediaOptions(); // 根据场景将用户角色设置为 BROADCASTER (主播) 或 AUDIENCE (观众) + // Set the user role as BROADCASTER (host) or AUDIENCE (audience) based on the scenario options.clientRoleType = Constants.CLIENT_ROLE_BROADCASTER; // 直播场景下,设置频道场景为 BROADCASTING (直播场景) + // In the live broadcast scenario, set the channel profile as BROADCASTING options.channelProfile = Constants.CHANNEL_PROFILE_LIVE_BROADCASTING; options.publishMicrophoneTrack = true; options.publishCameraTrack = true; options.autoSubscribeAudio = true; options.autoSubscribeVideo = true; // 使用临时 Token 加入频道,自行指定用户 ID 并确保其在频道内的唯一性 + // Join the channel with a temporary Token, specify the user ID, and ensure that it is unique in the channel mRtcEngine.joinChannel(token, channelName, 0, options); } @@ -102,20 +117,23 @@ private void setupRemoteVideo(int uid) { surfaceView.setZOrderMediaOverlay(true); container.addView(surfaceView); // 将 SurfaceView 对象传入声网实时互动 SDK,设置远端视图 + //Pass the SurfaceView object to the Agora Real-Time Interaction SDK to set up the remote view. mRtcEngine.setupRemoteVideo(new VideoCanvas(surfaceView, VideoCanvas.RENDER_MODE_FIT, uid)); } private static final int PERMISSION_REQ_ID = 22; // 获取体验实时音视频互动所需的录音、摄像头等权限 + // Get the permissions required for real-time audio and video interaction private String[] getRequiredPermissions(){ // 判断 targetSDKVersion 31 及以上时所需的权限 + // Determine the permissions required when targetSDKVersion is 31 or higher if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.S) { return new String[]{ - Manifest.permission.RECORD_AUDIO, // 录音权限 - Manifest.permission.CAMERA, // 摄像头权限 - Manifest.permission.READ_PHONE_STATE, // 读取电话状态权限 - Manifest.permission.BLUETOOTH_CONNECT // 蓝牙连接权限 + Manifest.permission.RECORD_AUDIO, // 录音权限 // Recording permission + Manifest.permission.CAMERA, // 摄像头权限 // Camera permission + Manifest.permission.READ_PHONE_STATE, // 读取电话状态权限 // Read phone state permission + Manifest.permission.BLUETOOTH_CONNECT // 蓝牙连接权限 // Bluetooth connection permission }; } else { return new String[]{ @@ -140,6 +158,7 @@ protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); // 如果已经授权,则初始化 RtcEngine 并加入频道 + //If authorization has been granted, initialize the RtcEngine and join the channel. if (checkPermissions()) { initializeAndJoinChannel(); } else { @@ -151,6 +170,7 @@ protected void onCreate(Bundle savedInstanceState) { public void onRequestPermissionsResult(int requestCode, @NonNull String[] permissions, @NonNull int[] grantResults) { super.onRequestPermissionsResult(requestCode, permissions, grantResults); // 系统权限申请回调 + // System permission request callback if (checkPermissions()) { initializeAndJoinChannel(); } @@ -161,9 +181,11 @@ protected void onDestroy() { super.onDestroy(); // 停止本地视频预览 + // Stop local video preview mRtcEngine.stopPreview(); // 离开频道 + // Leave the channel mRtcEngine.leaveChannel(); RtcEngine.destroy(); From 866b1c9fc4fce4312b214e93544a993127a00cb4 Mon Sep 17 00:00:00 2001 From: weileifrank <1138289316@qq.com> Date: Tue, 10 Sep 2024 11:57:09 +0800 Subject: [PATCH 2/3] =?UTF-8?q?feat:=20=E9=A1=B9=E7=9B=AE=E6=A0=B9?= =?UTF-8?q?=E7=9B=AE=E5=BD=95=E4=B8=8B=E5=A2=9E=E5=8A=A0=E4=BA=86=E8=8B=B1?= =?UTF-8?q?=E6=96=87=E8=AF=B4=E6=98=8E=E6=96=87=E6=A1=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 30 +++++++++++++++--------------- README.zh.md | 31 +++++++++++++++++++++++++++++++ 2 files changed, 46 insertions(+), 15 deletions(-) create mode 100644 README.zh.md diff --git a/README.md b/README.md index e2396a6..0c0ca49 100644 --- a/README.md +++ b/README.md @@ -1,30 +1,30 @@ # Agora QuickStart +_English | [中文](README.zh.md) -## 简介 +## Overview -此仓库包含 Agora RTC Native SDK 的QuickStart示例项目。 +This repository contains QuickStart example projects for the Agora RTC Native SDK. -| 平台 | 语言 | 项目位置 | SDK | +| Platform | Language | Project Location | SDK | | -------- | -------- |------------------------------------------------------| ------------------------------------------------------------------------------------------------------------------------------- | | Android | Java | [Agora-RTC-QuickStart](Android/Agora-RTC-QuickStart-Android) | [RTC Java Video SDK](https://doc.shengwang.cn/doc/rtc/android/resources) | | iOS | Swift | [Agora-RTC-QuickStart](iOS/Agora-RTC-QuickStart-iOS) | [RTC Swift Video SDK](https://doc.shengwang.cn/doc/rtc/ios/resources) | -你可以进入不同平台的项目进行试用或参考源代码。 +You can access projects on different platforms for trial or to reference the source code. -## 反馈 +## Feedback -如果你有任何问题或建议,可以通过 issue 的形式反馈。 +If you have any problems or suggestions regarding the sample projects, feel free to file an issue. -## 相关资源 +## Related resources -- 你可以先参阅 [常见问题](https://docportal.shengwang.cn/cn/Real-time-Messaging/faq) -- 如果你想了解更多官方示例,可以参考 [官方 SDK 示例](https://github.com/AgoraIO) -- 如果你想了解声网 SDK 在复杂场景下的应用,可以参考 [官方场景案例](https://github.com/AgoraIO-usecase) -- 如果你想了解声网的一些社区开发者维护的项目,可以查看 [社区](https://github.com/AgoraIO-Community) -- 若遇到问题需要开发者帮助,你可以到 [开发者社区](https://rtcdeveloper.com/) 提问 -- 如果需要售后技术支持, 你可以在 [Agora Dashboard](https://dashboard.agora.io) 提交工单 +- Check our [FAQ](https://docs.agora.io/en/faq) to see if your issue has been recorded. +- Dive into [Agora SDK Samples](https://github.com/AgoraIO) to see more tutorials. +- Take a look at [Agora Use Case](https://github.com/AgoraIO-usecase) for more complicated real use case. +- Repositories managed by developer communities can be found at [Agora Community](https://github.com/AgoraIO-Community). +- If you encounter problems during integration, feel free to ask questions in [Stack Overflow](https://stackoverflow.com/questions/tagged/agora.io). -## 许可证 +## License -示例项目遵守 MIT 许可证。 +The sample projects are under the MIT license. diff --git a/README.zh.md b/README.zh.md new file mode 100644 index 0000000..f0f2a2f --- /dev/null +++ b/README.zh.md @@ -0,0 +1,31 @@ +# Agora QuickStart + +[English](README.md) | 中文 + +## 简介 + +此仓库包含 Agora RTC Native SDK 的QuickStart示例项目。 + +| 平台 | 语言 | 项目位置 | SDK | +| -------- | -------- |------------------------------------------------------| ------------------------------------------------------------------------------------------------------------------------------- | +| Android | Java | [Agora-RTC-QuickStart](Android/Agora-RTC-QuickStart-Android) | [RTC Java Video SDK](https://doc.shengwang.cn/doc/rtc/android/resources) | +| iOS | Swift | [Agora-RTC-QuickStart](iOS/Agora-RTC-QuickStart-iOS) | [RTC Swift Video SDK](https://doc.shengwang.cn/doc/rtc/ios/resources) | + +你可以进入不同平台的项目进行试用或参考源代码。 + +## 反馈 + +如果你有任何问题或建议,可以通过 issue 的形式反馈。 + +## 相关资源 + +- 你可以先参阅 [常见问题](https://docportal.shengwang.cn/cn/Real-time-Messaging/faq) +- 如果你想了解更多官方示例,可以参考 [官方 SDK 示例](https://github.com/AgoraIO) +- 如果你想了解声网 SDK 在复杂场景下的应用,可以参考 [官方场景案例](https://github.com/AgoraIO-usecase) +- 如果你想了解声网的一些社区开发者维护的项目,可以查看 [社区](https://github.com/AgoraIO-Community) +- 若遇到问题需要开发者帮助,你可以到 [开发者社区](https://rtcdeveloper.com/) 提问 +- 如果需要售后技术支持, 你可以在 [Agora Dashboard](https://dashboard.agora.io) 提交工单 + +## 许可证 + +示例项目遵守 MIT 许可证。 From f6460b7ef8c026f79856c03e4320272c380ec8df Mon Sep 17 00:00:00 2001 From: weileifrank <1138289316@qq.com> Date: Wed, 11 Sep 2024 09:48:39 +0800 Subject: [PATCH 3/3] feat: add url description adapter for english readme doc --- Android/Agora-RTC-QuickStart-Android/README.md | 8 ++++---- README.md | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Android/Agora-RTC-QuickStart-Android/README.md b/Android/Agora-RTC-QuickStart-Android/README.md index 58ae31e..d927729 100644 --- a/Android/Agora-RTC-QuickStart-Android/README.md +++ b/Android/Agora-RTC-QuickStart-Android/README.md @@ -11,8 +11,8 @@ Before implementing the functionality, please prepare your development environme - Android Studio version 4.1 or above. - Android API level 16 or above. - Two mobile devices running Android 4.1 or above. -- A computer with internet access. If your network environment has a firewall, refer to Dealing with [Firewall Restrictions](https://doc.shengwang.cn/doc/rtc/android/basic-features/firewall) to use Agora services normally. -- An active Agora account and an Agora project. Please refer to [Enabling Services](https://doc.shengwang.cn/doc/rtc/android/get-started/enable-service) to obtain the following information from the Agora Console: +- A computer with internet access. If your network environment has a firewall, refer to Dealing with [Firewall Restrictions](https://docs.agora.io/en/video-calling/core-functionality/cloud-proxy?platform=android) to use Agora services normally. +- An active Agora account and an Agora project. Please refer to [Enabling Services](https://docs.agora.io/en/video-calling/get-started/manage-agora-account?platform=android) to obtain the following information from the Agora Console: - App ID:A randomly generated string by Agora to identify your project. - Temporary Token: Also known as a dynamic key, used for user authentication when joining a channel. The temporary token is valid for 24 hours. @@ -20,8 +20,8 @@ Before implementing the functionality, please prepare your development environme This section explains how to compile and run the sample program. -1. Go to the [Console project](https://console.shengwang.cn/), copy the **App ID** from the backend, and make a note of it, as you will need it when launching the app later. -2. (Optional) If you enable security mode, use the [Temporary Token Generator](https://docportal.shengwang.cn/cn/Agora%20Platform/get_appid_token?platform=All%20Platforms#%E8%8E%B7%E5%8F%96%E4%B8%B4%E6%97%B6-token) to generate a temporary RTC token for a channel, and make a note of the **Channel Name** and **Token**, as you will need them when launching the app later. +1. Go to the [Console project](https://console.agora.io/v2), copy the **App ID** from the backend, and make a note of it, as you will need it when launching the app later. +2. (Optional) If you enable security mode, use the [Temporary Token Generator](https://docs.agora.io/en/video-calling/get-started/manage-agora-account?platform=android#generate-temporary-tokens) to generate a temporary RTC token for a channel, and make a note of the **Channel Name** and **Token**, as you will need them when launching the app later. 3. Edit `app/src/main/java/io/agora/quickstart/rtc/MainActivity.java`, replacing `<#Your App ID#>`, `<#Your channel name#>`, and `<#Your Token#>` with your App ID, channel name, and token, respectively. ``` diff --git a/README.md b/README.md index 0c0ca49..9b1506c 100644 --- a/README.md +++ b/README.md @@ -8,8 +8,8 @@ This repository contains QuickStart example projects for the Agora RTC Native SD | Platform | Language | Project Location | SDK | | -------- | -------- |------------------------------------------------------| ------------------------------------------------------------------------------------------------------------------------------- | -| Android | Java | [Agora-RTC-QuickStart](Android/Agora-RTC-QuickStart-Android) | [RTC Java Video SDK](https://doc.shengwang.cn/doc/rtc/android/resources) | -| iOS | Swift | [Agora-RTC-QuickStart](iOS/Agora-RTC-QuickStart-iOS) | [RTC Swift Video SDK](https://doc.shengwang.cn/doc/rtc/ios/resources) | +| Android | Java | [Agora-RTC-QuickStart](Android/Agora-RTC-QuickStart-Android) | [RTC Java Video SDK](https://docs.agora.io/en/sdks?platform=android) | +| iOS | Swift | [Agora-RTC-QuickStart](iOS/Agora-RTC-QuickStart-iOS) | [RTC Swift Video SDK](https://docs.agora.io/en/sdks?platform=ios) | You can access projects on different platforms for trial or to reference the source code.