Difference between revisions of "Trigger: Shake Device"

m
 
(3 intermediate revisions by 2 users not shown)
Line 1: Line 1:
<pre style="background-color: #EEEEEE; color: Black; border-radius: 10px; padding: 10px;">
+
<pre class="header-style">This trigger will fire when you shake the device. Note that by default this trigger will only operate when the device's screen is on unless configured in the application trigger specific settings.</pre>
This trigger will fire when you shake the device. Note that by default this trigger will only operate when the device's screen is on unless configured in the application trigger specific settings.
 
</pre>
 
  
'''Example Usage'''<br/>
+
''' Options '''
When shake your device toggle the flashlight
 
<pre style="background-color: #AC2424; color: white; border-radius: 10px; padding: 10px;">
 
Triggers
 
  
Shake device
+
This trigger has no configurable options in the macro editor. However, global settings are available in MacroDroid's Settings:
</pre><br>
 
<pre style="background-color: #1665B0; color: white; border-radius: 10px; padding: 10px;">
 
Actions
 
  
Torch toggle (in background)
+
* '''Shake Sensitivity''' - Adjusts how sensitive the shake detection is (configurable in Settings)
</pre><br>
+
* '''Sample Rate''' - Controls how frequently the accelerometer is polled: Slow, Medium, or Fast (configurable in Settings)
<pre style="background-color: green; color: white; border-radius: 10px; padding: 10px;">
+
* '''Shake when Screen Off''' - Enable shake detection even when the screen is off (configurable in Settings)
Constrains
+
* '''Vibrate on Shake''' - Provide haptic feedback when a shake is detected (configurable in Settings)
  
 +
''' Examples '''
  
</pre><br>
+
'''Example 1: Flashlight toggle'''
<pre style="background-color: teal; color: white; border-radius: 10px; padding: 10px;">
 
Local variables
 
  
 +
Toggle the flashlight by shaking your phone:
  
</pre><br>
+
  <pre class="trigger-style">Triggers
 +
 
 +
Shake Device</pre>
 +
  <pre class="action-style">Actions
 +
 
 +
Torch: Toggle</pre>
 +
 
 +
'''Example 2: Reject incoming call'''
 +
 
 +
Shake to reject an incoming call:
 +
 
 +
  <pre class="trigger-style">Triggers
 +
 
 +
Shake Device</pre>
 +
  <pre class="action-style">Actions
 +
 
 +
End Call</pre>
 +
  <pre class="constraint-style">Constraints
 +
 
 +
Phone Ringing</pre>
 +
 
 +
'''Example 3: Random music shuffle'''
 +
 
 +
Shake to skip to a random song:
 +
 
 +
  <pre class="trigger-style">Triggers
 +
 
 +
Shake Device</pre>
 +
  <pre class="action-style">Actions
 +
 
 +
Media Control: Next Track</pre>
 +
  <pre class="constraint-style">Constraints
 +
 
 +
Music Playing</pre>
 +
 
 +
'''Example 4: Emergency message'''
 +
 
 +
Shake to send an emergency location message:
 +
 
 +
  <pre class="trigger-style">Triggers
 +
 
 +
Shake Device</pre>
 +
  <pre class="action-style">Actions
 +
 
 +
Send SMS: "Emergency! My location: [last_loc_link]" to Emergency Contact</pre>
 +
 
 +
''' Notes '''
 +
 
 +
* By default, shake detection only works when the screen is on to conserve battery. Enable "Shake when Screen Off" in settings if you need it to work with the screen off.
 +
* When a shake is detected and a macro fires, the device will vibrate briefly (if haptic feedback is enabled in settings) to confirm the shake was registered
 +
* The trigger uses the device's accelerometer sensor
 +
* Sensitivity and sample rate can be adjusted in MacroDroid Settings under the Shake Device trigger section
 +
* Keeping shake detection enabled with the screen off will increase battery consumption
 +
* The shake listener is automatically disabled when no macros using this trigger are enabled
 +
 
 +
''' See Also '''
 +
 
 +
* [[Trigger:_Proximity_Sensor|Proximity Sensor]]
 +
* [[Action:_Torch_On/Off|Torch On/Off]]
 +
* [[Action:_Vibrate|Vibrate]]

Latest revision as of 21:50, 6 January 2026

This trigger will fire when you shake the device. Note that by default this trigger will only operate when the device's screen is on unless configured in the application trigger specific settings.

Options

This trigger has no configurable options in the macro editor. However, global settings are available in MacroDroid's Settings:

  • Shake Sensitivity - Adjusts how sensitive the shake detection is (configurable in Settings)
  • Sample Rate - Controls how frequently the accelerometer is polled: Slow, Medium, or Fast (configurable in Settings)
  • Shake when Screen Off - Enable shake detection even when the screen is off (configurable in Settings)
  • Vibrate on Shake - Provide haptic feedback when a shake is detected (configurable in Settings)

Examples

Example 1: Flashlight toggle

Toggle the flashlight by shaking your phone:

Triggers

Shake Device
Actions

Torch: Toggle

Example 2: Reject incoming call

Shake to reject an incoming call:

Triggers

Shake Device
Actions

End Call
Constraints

Phone Ringing

Example 3: Random music shuffle

Shake to skip to a random song:

Triggers

Shake Device
Actions

Media Control: Next Track
Constraints

Music Playing

Example 4: Emergency message

Shake to send an emergency location message:

Triggers

Shake Device
Actions

Send SMS: "Emergency! My location: [last_loc_link]" to Emergency Contact

Notes

  • By default, shake detection only works when the screen is on to conserve battery. Enable "Shake when Screen Off" in settings if you need it to work with the screen off.
  • When a shake is detected and a macro fires, the device will vibrate briefly (if haptic feedback is enabled in settings) to confirm the shake was registered
  • The trigger uses the device's accelerometer sensor
  • Sensitivity and sample rate can be adjusted in MacroDroid Settings under the Shake Device trigger section
  • Keeping shake detection enabled with the screen off will increase battery consumption
  • The shake listener is automatically disabled when no macros using this trigger are enabled

See Also