Is there a way to enable a system-wide disable/mute switch for audio when the playback device changes (i.e. on an Android phone). Sometimes on the bus, my Bluetooth headset will disconnect from the phone, and VLC continues to play music loudly through the built-in speakers, which is embarassing for the user and annoying to other passengers.

Similarly, using "Smart Audiobook Player", if the same thing happens, the family gets to listen to whatever I'm listening to during a Bluetooth disconnect until I manually unlock and stop playback 30 seconds later. Is there any reliable mechanism built into the OS to clamp down on this "feature"?

  • Would a solution be okay if it provides lowering the volume of speakers to a certain level, say 0, when a BT or headphone is connected? In this this way, even if the BT gets disconnected automatically or manually, the sound would not emit from speakers or to an extent you had pre-selected.
    – Firelord
    Commented Jan 18, 2019 at 18:17
  • @Firelord Unfortunately, no: I'd like to disable the audio playback outright (i.e. s/w mute), or be able to suspend any applications that attempt to play audio.
    – Cloud
    Commented Jan 18, 2019 at 21:32

1 Answer 1


You can achieve it with Macrodroid by creating macros to pause apps such as VLC.

  1. Open the app, select Add Macro.
  2. Under the Connectivity section, select Headset Insert/Remove, then choose Headphones Removed. Click OK.
  3. Go to Actions tab, under the Media section, select Control Media, select Simulate Media Button, click OK, then select Pause. Click OK and select the app you want to mute/pause. Click check the check mark button on the bottom right, give the macro a name.

When completed, the macro will look like the image below (there are 2 Media Pause because 2 apps where selected).


A solution to disable sound only for VLC if you are unable to use the steps described above:

  1. Open VLC, go to Settings, then to Extra settings, click on Audio.
  2. Go to Headset section, enable Detect headset.

Note: I didn't test it with a Bluetooth headset.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .