Introducing Azure Communication Services UI Library to Xamarin
Overview
A few months ago we released the Azure Communication Services UI Library for iOS & Android (https://techcommunity.microsoft.com/t5/azure-communication-services/azure-communication-services-ui-library-now-available-for-ios/ba-p/3556319). Today we are excited to share our first efforts with Cross-Platform development. To help empower more mobile developers around the world we have created a Xamarin sample to showcase how to introduce calling capabilities into their current applications.
The sample will walk through steps on how Xamarin developers can create a binding for the iOS and Android platform. These binding libraries allow a Xamarin application to consume and third-party native library.
Using the Samples
The great thing about our sample repo is that developers can just dive into our repo and take our bindings as is and include them in their project.
Developers can check out the contents on XamariniOSBindings. There is a pre-built proxy library that bridges the Swift interface to Objective-C already, feel free to copy and edit these to your needs. There is also a helpful script developers can use to build the FATFrameworks for the bindings.
CommunicationUIProxy.Binding contains the solution that builds the .dll that can be used in your Xamarin Application. In your applications iOS.csproj you can add our newly created iOS binding .dll under the references folder.
Learn more about creating iOS bindings here: Walkthrough: Bind an iOS Swift library - Xamarin | Microsoft Docs
The contents of XamarinAndroidBindings has multiple folders in it. AzureCore, AzureCommunicationCommon, and CommunicationUILibrary. Each contain their own solution and csproj. Developers can reference these csproj directly in their solution or use the .dll files they generated in their own application. Let's not forget to include our AzureCommunicationCalling .aar as an AndroidAarLibrary build item.
Learn more about creating Android bindings here: Binding an .AAR - Xamarin | Microsoft Docs
Now that the binding libraries are included, we can update the source code of the app and use the new public apis.
Finally! Our app now can launch the UI composite. We now have an audio and video experience embedded into the app.
Of course, you can always just run our sample solution in the repo, play around and see how things work. You will notice you can launch the experience and it will be identical to how you expect native behavior to be.
Check out: Azure-Samples/communication-services-ui-library-xamarin: UI sample library on how to create Xamarin bindings (github.com) to learn more!
Published on:
Learn moreRelated posts
Azure Developer CLI (azd) – November 2024
This post announces the November release of the Azure Developer CLI (`azd`). The post Azure Developer CLI (azd) – November 2024 appeared...
Microsoft Purview | Information Protection: Auto-labeling for Microsoft Azure Storage and Azure SQL
Microsoft Purview | Information Protection will soon offer Auto-labeling for Microsoft Azure Storage and Azure SQL, providing automatic l...
5 Proven Benefits of Moving Legacy Platforms to Azure Databricks
With evolving data demands, many organizations are finding that legacy platforms like Teradata, Hadoop, and Exadata no longer meet their needs...
November Patches for Azure DevOps Server
Today we are releasing patches that impact our self-hosted product, Azure DevOps Server. We strongly encourage and recommend that all customer...
Elevate Your Skills with Azure Cosmos DB: Must-Attend Sessions at Ignite 2024
Calling all Azure Cosmos DB enthusiasts: Join us at Microsoft Ignite 2024 to learn all about how we’re empowering the next wave of AI innovati...
Query rewriting for RAG in Azure AI Search
Getting Started with Bicep: Simplifying Infrastructure as Code on Azure
Bicep is an Infrastructure as Code (IaC) language that allows you to declaratively define Azure resources, enabling automated and repeatable d...
How Azure AI Search powers RAG in ChatGPT and global scale apps
Millions of people use Azure AI Search every day without knowing it. You can enable your apps with the same search that enables retrieval-augm...