你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn。
重要
Azure 通信服务的这一功能目前以预览版提供。 预览版中的功能已公开发布,可供所有新客户和现有Microsoft客户使用。
预览版 API 和 SDK 在没有服务级别协议的情况下提供。 建议不要将它们用于生产工作负荷。 某些功能可能不受支持,或者功能可能受到限制。
有关详细信息,请参阅 Microsoft Azure 预览版补充使用条款。
Azure 通信服务引入了使用 .NET MAUI 和 React Native 解决方案的跨平台开发。 此示例演示了 Azure 通信服务通话如何与移动平台的 UI 库集成并创建绑定,使开发人员能够开始使用通话功能进行生成。
适用于 .NET MAUI 的 Azure 通信 UI 移动库
此项目演示了如何将 Azure 通信 UI 库集成到 .NET MAUI 应用程序中。 它利用 Azure 通信服务和本机 Azure 通信服务 UI 库来生成兼具语音和视频通话功能的通话体验。
下载代码
在 GitHub 上查找此示例项目。
功能
请参阅原生 UI 库概述
先决条件
- Visual Studio 安装说明
- 具有活动订阅的 Azure 帐户。 有关详细信息,请参阅创建免费账户。
- iOS 要求
- Android 要求
- 一个 Azure 通信服务资源。 有关详细信息,请参阅创建 Azure 通信服务资源。
- 运行身份验证终结点以获取访问令牌的 Azure Function。
运行示例应用
克隆存储库。
适用于 Android
Visual Studio Mac/Windows 2022
- 在终端中导航到
/AndroidMauiBindings
,并在此目录中运行./downloadJarScript.sh
。 要在 Windows 上运行GitBash
,应当启用Windows Subsystem for Linux (WSL)
或.sh
。 - 在 Visual Studio 中打开
CommunicationCallingSampleMauiApp/CommunicationCallingSampleMauiApp.sln
- 编辑
CommunicationCallingSampleMauiApp/CommunicationCallingSampleMauiApp.csproj
并设置<TargetFrameworks>net7.0-android</TargetFrameworks>
。 - 在 Visual Studio 中选择 android 设备/仿真器并运行
CommunicationCallingSampleMauiApp
应用。
适用于 iOS
Visual Studio Mac 2022
- 在终端中导航到
communication-services-ui-library-maui/iOSMauiBindings/ProxyLibs/CommunicationUI-Proxy
,并在此目录中运行./iOSFramework.sh -d
。 - 在 Visual Studio 中打开
CommunicationCallingSampleMauiApp/CommunicationCallingSampleMauiApp.sln
- 编辑
CommunicationCallingSampleMauiApp/CommunicationCallingSampleMauiApp.csproj
并设置<TargetFrameworks>net7.0-ios</TargetFrameworks>
。 - 在 Visual Studio 中选择 iOS 设备/仿真器并运行
CommunicationCallingSampleMauiApp
应用。
亮点和反馈
请访问 GitHub 以了解详细信息、发现更多功能并分享有价值的反馈。
适用于 React Native 的 Azure 通信 UI 移动库
此项目演示了 Azure 通信 UI 库与 React Native 的集成利用本机 Azure 通信 UI 库和 Azure 通信服务来生成兼具语音和视频通话的通话体验。
下载代码
在 GitHub 上查找此示例项目。
功能
请参阅原生 UI 库概述
先决条件
- Visual Studio 安装说明
- 具有活动订阅的 Azure 帐户。 有关详细信息,请参阅创建免费账户。
- iOS 要求
- Android 要求
- 一个 Azure 通信服务资源。 有关详细信息,请参阅创建 Azure 通信服务资源。
- 运行身份验证终结点以获取访问令牌的 Azure Function。
- Node、Watchman 和 React Native CLI:请参阅 React Native 环境设置指南。
- Yarn:请参阅安装指南
运行示例应用
导航到 AzureCommunicationUIDemoApp/
:
- 运行
yarn install
适用于 iOS
安装 iOS 应用依赖项:
- 在终端中,导航到
AzureCommunicationUIDemoApp/ios/
: - 运行
pod install --repo-update
适用于 Android
生成 Android 应用依赖项:
- 在终端中,导航到
AzureCommunicationUIDemoApp/android/
: - 运行
./gradlew build
执行
导航回 AzureCommunicationUIDemoApp/
- 运行
yarn react-native start
- 打开另一个终端,导航到
AzureCommunicationUIDemoApp/
文件夹,然后运行yarn react-native run-ios
或yarn react-native run-android
或者,还可以通过从 .xcworkspace
文件启动 Xcode 来运行 iOS 应用,并在模拟器或 iOS 设备上使用方案 AzureCommunicationUIDemoApp
来运行应用。
若要运行 Android 应用,还可以在同步 Gradle 后启动 Android Studio 并在 Android 模拟器或 Android 设备上运行。 可以通过两种方法来同步 Gradle:在 Android 文件夹中使用命令 ./gradlew build
,或通过 Android Studio 进行。
亮点和反馈
请访问 GitHub 以了解详细信息、发现更多功能并分享有价值的反馈。