Changes

no edit summary
Line 1: Line 1: −
This trigger will fire when a USB peripheral device such as a keyboard, mouse or USB memory stick is connected/disconnected from the Android phone/tablet.
+
<pre class="header-style">This trigger will fire when a USB device such as a memory stick or keyboard is connected or disconnected. It monitors for USB peripherals and accessories attached to your Android device.</pre>
   −
Note that this trigger will not fire in the case where the Android device is connected to a PC or similar.
+
''' Options '''
 +
 
 +
* '''USB Device Connected''': Trigger when a USB device is attached to the Android device
 +
* '''USB Device Disconnected''': Trigger when a USB device is detached from the Android device
 +
 
 +
''' Magic Text '''
 +
 
 +
This trigger provides the following magic text values:
 +
 
 +
* '''{usb_product_name}''': The product name of the connected/disconnected USB device
 +
* '''{usb_manufacturer_name}''': The manufacturer name of the USB device
 +
* '''{usb_device_hash}''': A unique identifier hash code for the USB device
 +
 
 +
''' Monitored Events '''
 +
 
 +
The trigger monitors the following USB events:
 +
* USB device attached
 +
* USB device detached
 +
* USB accessory attached
 +
* USB accessory detached
 +
 
 +
''' Examples '''
 +
 
 +
  <pre class="trigger-style">Triggers
 +
 
 +
USB Device Connect/Disconnect: USB Device Connected</pre>
 +
  <pre class="action-style">Actions
 +
 
 +
Notification: USB Device Connected
 +
    [usb_product_name] by [usb_manufacturer_name]
 +
Speak Text: USB device connected</pre>
 +
 
 +
''Notify when any USB device is connected and announce via TTS.''
 +
 
 +
----
 +
 
 +
  <pre class="trigger-style">Triggers
 +
 
 +
USB Device Connect/Disconnect: USB Device Disconnected</pre>
 +
  <pre class="action-style">Actions
 +
 
 +
Popup Message: USB device safely removed</pre>
 +
 
 +
''Show confirmation when a USB device is safely disconnected.''
 +
 
 +
''' Notes '''
 +
 
 +
* This trigger will NOT fire when the Android device itself is connected to a PC or similar as a USB peripheral. It only monitors USB devices connected TO the Android device.
 +
* Works with USB OTG (On-The-Go) connections where the Android device acts as the host.
 +
* Supported devices include USB keyboards, mice, game controllers, USB flash drives, and other USB peripherals.
 +
* USB accessories connected via the accessory protocol are also detected.
 +
* The device information (product name, manufacturer) availability depends on the USB device providing this information.