This project demonstrates the integration of Azure Communication UI library into Xamarin Forms that utilizes the native Azure Communication UI library and Azure Communication Services to build a calling experience that features both voice and video calling.
Please refer to our native UI Library overview
We appreciate your feedback and energy helping us improve our services. If you've tried the service, please give us feedback through this survey.
- iOS Requirements
- Android Requirements
- Visual Studio Setup Instructions
- Azure Communication Services Token See example
Clone repo and open CommunicationCallingXamarinSampleApp.sln
in Visual Studio
- Navigate to
/XamarinAndroidBindings/
and in this directory in terminal runsh downloadJarScript
Learn More
Set CommunicationCallingXamarinSampleApp.Android
as start up project, build solution and select a device or emulator to run application.
- Navigate to
/XamariniOSBindings/ProxyLibs/CommunicationUI-Proxy
and in this directory in terminal runsh iOSFramework -d
Learn More - Next navigate to
/XamariniOSBindings/CommunicationUIProxy.Binding
and build theCommunicationUIProxy.Binding.sln
. This will generateCommunicationUIProxy.Binding\bin
folder where it will haveNativeLibrary.dll
for you to use.
Set CommunicationCallingXamarinSampleApp.iOS
as start up project, build, and select a device or emulator to run application.
| CommunicationCallingXamarinSampleApp
| CommunicationCallingXamarinSampleApp.Android -> Android Xamarin sample application.
| CommunicationCallingXamarinSampleApp.Android -> iOS Xamarin sample application.
| CommunicationCallingXamarinSampleApp -> Common code for Android and iOS (UI).
| XamarinAndroidBindings
| CommunicationUILibrary -> Bindings for Azure Communication UI library
| CommunicationCommon -> Bindings for communication common (required for object `CommunicationTokenCredentials`)
| CommunicationCore -> Bindings for communication core (required for object `ExpandableStringEnum`)
| XamariniOSBindings
| CommunicationUIProxy.Binding -> Bindings for Azure Communication UI library
| ProxyLibs -> CommunicationUI proxy library to bridge swift methods to objective-c
The common code for Android and iOS include UI
and interface
to trigger a call in Android and iOS specific projects.
CommunicationCallingXamarinSampleApp/JoinCallPage.xaml.cs
has common UI code for Android and iOS. On Button click, Android and iOS app is triggered to start a call.
void OnButtonClicked(object sender, EventArgs e)
{
if (!String.IsNullOrEmpty(tokenEntry.Text) && !String.IsNullOrEmpty(meetingEntry.Text))
{
callComposite.joinCall(name.Text, tokenEntry.Text, meetingEntry.Text, isTeamsCall, _localization, _dataModelInjection);
}
}
CommunicationCallingXamarinSampleApp/IComposite.cs
has common interface used by Android and iOS sample application to start a call.
namespace CommunicationCallingXamarinSampleApp
{
public interface IComposite
{
void joinCall(string name, string acsToken, string callID, bool isTeamsCall, LocalizationProps? localization, DataModelInjectionProps? dataModelInjection);
List<string> languages();
}
}
To learn more about how this sample was created and communicates with the native ACS Mobile UI Library, please refer to our briding guides: