How to unpair a bluetoothle devices in xamarin forms?

AswathyAswathy Member ✭✭✭
edited May 18 in Xamarin.Forms

I want to unpair a paired device from my app, I am using this link to develop my app:- .

Here is my code to unpair

  public bool UnPair(BLEDevice bleDevice)
        bool _paired = false;

            BluetoothDevice device = (BluetoothDevice)bleDevice.ActualDevice.NativeDevice;

            Method m = device.Class.GetMethod("removeBond",null);


            _paired = device.BondState == Bond.Bonded ? true :false;

        catch (System.Exception ex)


        return _paired;


Sign In or Register to comment.