MaUI (formely Xamarin)
MaUI SDK
To use Liblinphone in a MaUI application, you need the linphone-sdk nuget package that embeds and wraps the native libraries for Android & iOS, and provide the liblinphone C# wrapper.
Adding the NuGet package to your project (>= 5.2.0)
Since version 5.2.0, a .nupkg is availble for download from our self-hosted NuGet package registry.
- Add the Linphone package source to your development environment (You only need to do that once)
nuget source Add -Name "Linphone" -Source "https://gitlab.linphone.org/api/v4/projects/411/packages/nuget/index.json"
Or in Visual Studio, go to Tools->Nuget Package Manager->Package Manager Settings, then Package sources, and add a new package source with the URL above. - Install the LinphoneSDK package from that new source
nuget install LinphoneSDK -Source "Linphone"
You will then be able to update the package as you do other NuGet packages, and are now ready to start developing cross-platform mobile SIP apps with Xamarin or Maui. Although it is not leveraging this new nuget package yet, we recommend taking a look at our sample app to get you started.
What's in the box
The SDK embeds the following:
- The Android libraries for armv7, arm64 (as AAR) ;
- The iOS libraries for devices and simulator
Platform specifics
Android
Don't forget to add the required permissions to the AndroidManifest.xml file. Here's the list of all permissions our SDK might need:
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" ></uses-permission>
<uses-permission android:name="android.permission.WAKE_LOCK" ></uses-permission>
<!-- Needed to be able to use WifiManager.MulticastLock -->
<uses-permission android:name="android.permission.CHANGE_WIFI_MULTICAST_STATE" ></uses-permission>
<uses-permission android:name="android.permission.CAMERA" ></uses-permission>
<!-- Needed to allow Linphone to install on tablets, since android.permission.CAMERA implies android.hardware.camera and android.hardware.camera.autofocus are required -->
<uses-feature android:name="android.hardware.camera" android:required="false" ></uses-feature>
Finally if you are deploying on Android >= 23 ask at runtime the permissions like you would do on a native Android application.