sindresorhus / Actions

⚙️ Supercharge your shortcuts
https://sindresorhus.com/actions
MIT License
2.58k stars 109 forks source link

Action proposal: Disconnect Bluetooth Device #145

Closed stanleyguevara closed 1 year ago

stanleyguevara commented 1 year ago

Description

Hey, first of all, nice app, as an long time Android user newly adapting to iPhone it was one of the first things I've installed :)

My use case is NFC headphone connection automation (Sony WH-1000XM4)

I did a nice script to react to NFC tag in headphones. The aim is to tap headphones with the phone to connect and then tap again to disconnect. Connecting the headphones is easy thanks to "Get audio playback destination" and "Add to playback destination" actions. Unfortunately disconnecting requires turning Bluetooth off and the on again, which is not optimal if there are other devices connected. "Remove from playback destinations" won't work, as it simply routes output to iPhone speaker, but the headphones are still connected.

sindresorhus commented 1 year ago

This is unfortunately not possible. Because of iOS restrictions, it cannot disconnect something it did not connect to. The only ones that can add such an action is Apple.