How to connect and disconnect a bluetooth headset on windows 10

Viewed 132

I am looking for a way to control the connection of my Sony WH-1000XM3. I am trapped in the following scenario:

  1. In settings you can connect the device.
  2. Switch off the head phone.
  3. When head phone is switched on again, it will connect the windows 10 system.

However I would like to use it with may android phone.

To solve the problem I would like to disconnect the head phone after some time, of based on events, like going to sleep. My preferred development environment is C#. I did explore the following libraries:

using Windows.Devices.Bluetooth;
using Windows.Devices.Bluetooth.Rfcomm;
using Windows.Devices.Enumeration;

With these libraries I can find DeviceInformation for the head phone. But there are no methods for controlling the connection state of the device.

What interface does provide the required functionality. How to get from DeviceInfomation to that interface?

0 Answers
Related