xenolightning / AudioSwitcher_v1

Version 1 of Audio Switcher
Microsoft Public License
884 stars 88 forks source link

Disconnecting Bluetooth Devices with AudioSwitcher - Enhancement Suggestion #2234

Open Cr8zyIvan opened 1 year ago

Cr8zyIvan commented 1 year ago

Please ensure you include/confirm the following information before submitting an issue.

Would it be a possibility to implement "Disconnecting a Bluetooth Device" in future Versions?

jeancroy commented 5 months ago

I'd also like to support this idea.

It also seems to be a non trivial task and I'd like to point to ToothTray as a project that has done some of the R&D on how to achieve this.

Here's a description of the problem of "one of the bad way" that's nevertheless the most popular when you search for it:

BluetoothRadio uses a method to connect and disconnect bluetooth devices described in both Stack Overflow and AutoHotKey community, by enabling and removing all associated services of a bluetooth devices. This method is slow for 2 reasons. Firstly, it has to initiate a bluetooth discovery which lasts for at leat 1.28 seconds. Secondly, modifying the service is almost like installing/uninstalling the driver and it takes some time. What's more, different bluetooth devices can have different services installed and we need a way to remember the services because once they are removed, there's no way to enumerate them anymore.

Cr8zyIvan commented 5 months ago

Ooh! Interesting. Does ToothTray work at all? I'm not sure how to install it, not seeing an exe or msi installation file.

jeancroy commented 5 months ago

Yeah it seem to work, but the menu appears at the wrong place for win11. it's an exe with no installation. releases > assets > .exe

Cr8zyIvan commented 5 months ago

Awesome, thanks. But Toothtray seems to suffer from the same thing as another tool I tried to use a couple of years ago. It's so slow to activate, it's almost longer to wait for Toothtray to Activate than to open up the Windows Bluetooth Settings with Keyboard Shortcuts and Clicking 3 times to Connect / Disconnect.

I right clicked on the Toothtray icon and I had to wait there for 10 seconds for a popup and a menu list to show. With these types of applications, you're always kept wondering if you've successfully launched the program, or if there's a glitch somewhere and you're waiting for nothing.

This phenomenon is most probably of no fault from the Toothtray developer(s), but of the way Microsoft decided to implement it's Bluetooth functionalities in Windows.