Changes

no edit summary
Line 1: Line 1: −
<pre style="background-color: #EEEEEE; color: Black; border-radius: 10px; padding: 10px;">
+
<pre class="header-style">
This trigger can be configured to fire when a device is placed in or removed from a dock. You can select to allow any type of dock or restrict to only desk or car docks.</pre>
+
This trigger will fire when the device is docked or undocked. For docking events, you can also specify the type of dock (desk or car).
<br>
+
</pre>
'''Example Usage'''<br/>
     −
<pre style="background-color: #AC2424; color: white; border-radius: 10px; padding: 10px;">
+
''' Options '''
Triggers
      +
* '''Any Dock''' - The trigger fires when the device is docked to any type of dock (desk, car, or other).
   −
</pre><br>
+
* '''Desk Dock''' - The trigger fires only when the device is docked to a desk dock.
<pre style="background-color: #1665B0; color: white; border-radius: 10px; padding: 10px;">
  −
Actions
      +
* '''Car Dock''' - The trigger fires only when the device is docked to a car dock.
   −
</pre><br>
+
* '''Undocked''' - The trigger fires when the device is removed from any dock.
<pre style="background-color: green; color: white; border-radius: 10px; padding: 10px;">
  −
Constraints
      +
''' Examples '''
   −
</pre><br>
+
Example 1: Enable car mode when in car dock
<pre style="background-color: teal; color: white; border-radius: 10px; padding: 10px;">
  −
Local variables
      +
  <pre class="trigger-style">Triggers
   −
</pre><br>
+
Device Docked/Undocked [Car Dock]</pre>
 +
  <pre class="action-style">Actions
 +
 
 +
Bluetooth On
 +
Launch Application: Android Auto
 +
Set Volume: Media 100%</pre>
 +
 
 +
Example 2: Start charging display when docked at desk
 +
 
 +
  <pre class="trigger-style">Triggers
 +
 
 +
Device Docked/Undocked [Desk Dock]</pre>
 +
  <pre class="action-style">Actions
 +
 
 +
Set Brightness: 50%
 +
Launch Application: Clock (Daydream)</pre>
 +
 
 +
Example 3: Restore normal settings when undocked
 +
 
 +
  <pre class="trigger-style">Triggers
 +
 
 +
Device Docked/Undocked [Undocked]</pre>
 +
  <pre class="action-style">Actions
 +
 
 +
Set Brightness: Auto
 +
Set Volume: Media 50%</pre>
 +
 
 +
''' Notes '''
 +
 
 +
* The dock type is determined by the Android system based on the dock hardware.
 +
* Not all docks report their type correctly - some may report as "desk" dock when they are car docks or vice versa.
 +
* This trigger listens for the ACTION_DOCK_EVENT system broadcast.
 +
* Wireless charging stands may not trigger dock events unless they are specifically designed to report as docks.
 +
 
 +
''' See Also '''
 +
 
 +
* [[Trigger:_Daydream_On/Off|Daydream On/Off Trigger]]
 +
* [[Trigger:_Power_Connected/Disconnected|Power Connected/Disconnected Trigger]]