BrainBit for developers Subscribe for updates Visit website

MAUI

The latest version is `1.0.6.26`.

 

Only for Android you need to add library initialization:

    
public static MauiApp CreateMauiApp()
{
var builder = MauiApp.CreateBuilder();
#if ANDROID
builder.UseNeurosdk2();
#endif
return builder.Build();
}
    

  


For Android you need request permissions to location and bluetooth:

    
#if ANDROID
private async void requestPermissions()
{
if(Build.VERSION.SdkInt >= BuildVersionCodes.S)
{
PermissionStatus locationStatus = await Permissions.CheckStatusAsync<Permissions.LocationWhenInUse>();
PermissionStatus BTStatus = await Permissions.CheckStatusAsync<Permissions.Bluetooth>();
}
else
{
PermissionStatus BTstatus = await Permissions.CheckStatusAsync<Permissions.Bluetooth>();
}

}
#endif
    

  

For iOS you need to add a key to `Info.plist`:

 

    
<key>NSBluetoothAlwaysUsageDescription</key>
<string>Explanation to using bluetooth</string>
    

 

 

For Windows you need to open package manifest and add enable capability "Bluetooth".

Another way is add this capability manually:
1. Go into `Platforms/Windows/` folder
2. Open `Package.appxmanifest` file
3. Into `Capabilities` section add:
`<DeviceCapability Name="bluetooth"/>`