Voice.Maui.Twilio
1.0.4
dotnet add package Voice.Maui.Twilio --version 1.0.4
NuGet\Install-Package Voice.Maui.Twilio -Version 1.0.4
<PackageReference Include="Voice.Maui.Twilio" Version="1.0.4" />
<PackageVersion Include="Voice.Maui.Twilio" Version="1.0.4" />
<PackageReference Include="Voice.Maui.Twilio" />
paket add Voice.Maui.Twilio --version 1.0.4
#r "nuget: Voice.Maui.Twilio, 1.0.4"
#:package Voice.Maui.Twilio@1.0.4
#addin nuget:?package=Voice.Maui.Twilio&version=1.0.4
#tool nuget:?package=Voice.Maui.Twilio&version=1.0.4
TwilioVoice.Maui
Cross-platform .NET MAUI library for Twilio Voice SDK. Provides a unified API for making and receiving voice calls on iOS and Android.
Installation
dotnet add package TwilioVoice.Maui
Requires .NET 10+ with iOS 15+ or Android 8+ (API 26).
Setup
You need the Twilio Voice binding projects for your platform:
iOS
Add the TwilioVoiceDotnetIos binding project to your solution, then initialize:
TwilioVoice.Maui.TwilioVoiceService.Instance.Initialize();
await TwilioVoice.Maui.TwilioVoiceService.Instance.SetupVoiceAsync();
Android
Add the TwilioVoiceDotnetAndroid binding project and Firebase Messaging, then initialize:
TwilioVoice.Maui.TwilioVoiceService.Instance.Initialize();
TwilioVoice.Maui.TwilioVoiceService.Instance.SetFcmToken("YOUR_FCM_TOKEN");
await TwilioVoice.Maui.TwilioVoiceService.Instance.SetupVoiceAsync();
Usage
Make a call
TwilioVoice.Maui.TwilioVoiceService.Instance.CallStarted += (to) => Console.WriteLine($"Calling {to}");
TwilioVoice.Maui.TwilioVoiceService.Instance.CallConnected += (to) => Console.WriteLine($"Connected to {to}");
TwilioVoice.Maui.TwilioVoiceService.Instance.CallEnded += (to) => Console.WriteLine($"Call with {to} ended");
TwilioVoice.Maui.TwilioVoiceService.Instance.MakeCall("+1234567890");
Hang up
TwilioVoice.Maui.TwilioVoiceService.Instance.HangUp();
Mute/unmute
TwilioVoice.Maui.TwilioVoiceService.Instance.SetMuted(true);
Handle incoming calls
TwilioVoice.Maui.TwilioVoiceService.Instance.IncomingCallReceived += (from) =>
{
// Show incoming call UI
TwilioVoice.Maui.TwilioVoiceService.Instance.AcceptIncomingCall();
// or TwilioVoice.Maui.TwilioVoiceService.Instance.RejectIncomingCall();
};
Events
| Event | Description |
|---|---|
CallStarted |
Outgoing call initiated |
CallRinging |
Remote side ringing |
CallConnected |
Call established |
CallEnded |
Call disconnected or failed |
IncomingCallReceived |
Incoming call invite received |
IncomingCallAnswered |
Incoming call accepted |
Requirements
- .NET 10+
- iOS 15+ with PushKit entitlement
- Android 8+ (API 26) with Firebase Cloud Messaging
- Twilio Voice SDK (iOS v6.3+ / Android v6.9+)
<p align="center"> <a href="https://paypal.me/ibrahimelkady1"> <img src="https://raw.githubusercontent.com/stefan-niedermann/paypal-donate-button/master/paypal-donate-button.png" alt="Donate with PayPal" height="48"> </a> <br> <sub>If this project helped you, consider supporting my work ❤️</sub> </p>
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0-android is compatible. net10.0-ios26.0 is compatible. |
-
net10.0-android
- No dependencies.
-
net10.0-ios26.0
- No dependencies.
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
Fixed project URL to point to GitHub repository.