How to fix Bluetooth connectivity issue for Android above 12.

adithya sharma 0 Reputation points

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

A Microsoft open-source app platform for building Android and iOS apps with .NET and C#.
5,208 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Graham McKechnie 241 Reputation points

    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();
    0 comments No comments