Start a .NET MAUI Project
Create a new .NET MAUI solution (.NET 9.0+) in Visual Studio, and add the following references using the NuGet packet manager:
FM.LiveSwitchFM.LiveSwitch.OpusFM.LiveSwitch.VpxFM.LiveSwitch.Yuv
Android
If you are creating an Android project, also add the following references:
FM.LiveSwitch.AndroidFM.LiveSwitch.AudioProcessing(if you want echo cancellation support)
The following permissions will be required which can be configured through the Project configuration in Visual Studio or by modifying the AndroidManifest.xml file:
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.CAMERA"/>
<uses-permission android:name="android.permission.RECORD_AUDIO"/>
<uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS"/>
<uses-permission android:name="android.permission.BLUETOOTH" />
iOS
If you are creating an iOS project, also add the following reference:
FM.LiveSwitch.Cocoa
You will also need to add the following configuration for iOS projects:
<PropertyGroup Condition="'$(Configuration)|$(TargetFramework)|$(Platform)'=='Debug|net9.0-ios|AnyCPU'">
<AdditionalArgs>-optimize=-remove-dynamic-registrar</AdditionalArgs>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(TargetFramework)|$(Platform)'=='Release|net9.0-ios|AnyCPU'">
<AdditionalArgs>-optimize=-remove-dynamic-registrar</AdditionalArgs>
</PropertyGroup>
Camera and Microphone permissions require the following settings which can be configured through the Project configuration in Visual Studio or by modifying the Info.plist file:
<key>NSMicrophoneUsageDescription</key>
<string>...</string>
<key>NSCameraUsageDescription</key>
<string>...</string>
Note
You can build both Android and iOS applications using the same project. Most of the APIs are shared between the two platforms.