Changes

no edit summary
Line 1: Line 1: −
<pre style="background-color: #EEEEEE; color: Black; border-radius: 10px; padding: 10px;">
+
<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>
This trigger will fire when headphones are connected or removed from the device.
  −
</pre>
     −
'''Example Usage'''<br/>
+
''' Options '''
Stop the music when the headphones are disconnected
  −
<pre style="background-color: #AC2424; color: white; border-radius: 10px; padding: 10px;">
  −
Triggers
     −
Headphones removed
+
* '''Headphones Inserted''': Trigger fires when headphones are plugged in
</pre><br>
+
** '''Any''': Triggers for any type of headphones
<pre style="background-color: #1665B0; color: white; border-radius: 10px; padding: 10px;">
+
** '''No Microphone''': Only triggers for headphones without a microphone
Actions
+
** '''With Microphone''': Only triggers for headphones/headsets that include a microphone
   −
Control media (Media Stop - simulate media stop button)
+
* '''Headphones Removed''': Trigger fires when headphones are unplugged
</pre><br>
  −
<pre style="background-color: green; color: white; border-radius: 10px; padding: 10px;">
  −
Constrains
      +
''' Examples '''
   −
</pre><br>
+
''Example 1: Launch Music App When Headphones Connected''
<pre style="background-color: teal; color: white; border-radius: 10px; padding: 10px;">
+
  <pre class="trigger-style">Triggers
Local variables
      +
Headphones Inserted (Any)</pre>
 +
  <pre class="action-style">Actions
   −
</pre><br>
+
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]]