Xamarin
A Microsoft open-source app platform for building Android and iOS apps with .NET and C#.
5,362 questions
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
I have given all the required Bluetooth permissions. My application supports Bluetooth connection with android 11 and below.
Even tried to create context and get the Bluetooth adapter using BluetoothManager.getAdaper(); an it throws error while i call the get adapter function.
Thank you in advance
Try the following
BluetoothManager? manager = Application.Context.GetSystemService(Application.BluetoothService) as BluetoothManager;
bluetoothAdapter = manager!.Adapter;
if (bluetoothAdapter == null)
Toast.MakeText(this, "This device doesn't support Bluetooth.", ToastLength.Long)!.Show();