Difference between revisions of "Trigger: Headphones Insert/Removed"

(Created page with "This trigger will fire when headphones are connected or removed from the device.")
 
 
(9 intermediate revisions by 3 users not shown)
Line 1: Line 1:
This trigger will fire when headphones are connected or removed from the device.
+
<pre class="header-style">The Headphones Inserted/Removed trigger fires when headphones are connected to or disconnected from the device. This allows you to automate actions based on headphone connection events, with the ability to differentiate between headphones with and without a microphone.</pre>
 +
 
 +
''' Options '''
 +
 
 +
* '''Headphones Inserted''': Trigger fires when headphones are plugged in
 +
** '''Any''': Triggers for any type of headphones
 +
** '''No Microphone''': Only triggers for headphones without a microphone
 +
** '''With Microphone''': Only triggers for headphones/headsets that include a microphone
 +
 
 +
* '''Headphones Removed''': Trigger fires when headphones are unplugged
 +
 
 +
''' Examples '''
 +
 
 +
''Example 1: Launch Music App When Headphones Connected''
 +
  <pre class="trigger-style">Triggers
 +
 
 +
Headphones Inserted (Any)</pre>
 +
  <pre class="action-style">Actions
 +
 
 +
Launch Application - Spotify</pre>
 +
 
 +
Automatically launches Spotify when any headphones are connected.
 +
 
 +
''Example 2: Pause Media When Headphones Removed''
 +
  <pre class="trigger-style">Triggers
 +
 
 +
Headphones Removed</pre>
 +
  <pre class="action-style">Actions
 +
 
 +
Control Media - Pause</pre>
 +
 
 +
Pauses media playback when headphones are unplugged to prevent audio from playing through the device speaker.
 +
 
 +
''' Notes '''
 +
 
 +
* This trigger monitors the ACTION_HEADSET_PLUG broadcast.
 +
* The microphone detection options only apply to the "Headphones Inserted" selection.
 +
* Bluetooth headphones may not trigger this event - use the Bluetooth trigger for wireless headphones.
 +
* Some devices may report headphone microphone presence differently.
 +
 
 +
''' See Also '''
 +
 
 +
* [[Trigger:_Bluetooth_Event|Bluetooth Event Trigger]]
 +
* [[Action:_Control_Media|Control Media Action]]

Latest revision as of 23:05, 5 January 2026

The Headphones Inserted/Removed trigger fires when headphones are connected to or disconnected from the device. This allows you to automate actions based on headphone connection events, with the ability to differentiate between headphones with and without a microphone.

Options

  • Headphones Inserted: Trigger fires when headphones are plugged in
    • Any: Triggers for any type of headphones
    • No Microphone: Only triggers for headphones without a microphone
    • With Microphone: Only triggers for headphones/headsets that include a microphone
  • Headphones Removed: Trigger fires when headphones are unplugged

Examples

Example 1: Launch Music App When Headphones Connected

Triggers

Headphones Inserted (Any)
Actions

Launch Application - Spotify

Automatically launches Spotify when any headphones are connected.

Example 2: Pause Media When Headphones Removed

Triggers

Headphones Removed
Actions

Control Media - Pause

Pauses media playback when headphones are unplugged to prevent audio from playing through the device speaker.

Notes

  • This trigger monitors the ACTION_HEADSET_PLUG broadcast.
  • The microphone detection options only apply to the "Headphones Inserted" selection.
  • Bluetooth headphones may not trigger this event - use the Bluetooth trigger for wireless headphones.
  • Some devices may report headphone microphone presence differently.

See Also