| Line 1: |
Line 1: |
| − | <pre style="background-color: #ACC8E5; color: #112A46; border-radius: 10px; padding: 10px;"> | + | <pre class="header-style">The Power Button Long Press trigger fires when you perform a long press on the device's power button. This provides a convenient way to launch macros using a hardware button that is available on all Android devices.</pre> |
| − | This trigger will fire when you long press on the power button.
| |
| | | | |
| − | Note that this trigger requires MacroDroid to be configured as the default assist and voice input app.
| + | ''' Requirements ''' |
| − | </pre> | + | |
| − | * ''On some devices this trigger may also fire when long pressing on the home button.''
| + | This trigger requires MacroDroid to be configured as the default assist and voice input app. When the trigger is added, MacroDroid will check if it is set as the default assist app and prompt you to configure it if needed. |
| | + | |
| | + | ''' Configuration ''' |
| | + | |
| | + | This trigger has no additional options - it simply fires when the power button is long pressed. |
| | + | |
| | + | ''' Examples ''' |
| | + | |
| | + | ''Example 1: Launch voice command app with power button'' |
| | + | |
| | + | <pre class="trigger-style">Triggers |
| | + | |
| | + | Power Button Long Press</pre> |
| | + | <pre class="action-style">Actions |
| | + | |
| | + | Launch Application: Google Assistant</pre> |
| | + | |
| | + | ''Example 2: Toggle flashlight with power button long press'' |
| | + | |
| | + | <pre class="trigger-style">Triggers |
| | + | |
| | + | Power Button Long Press</pre> |
| | + | <pre class="action-style">Actions |
| | + | |
| | + | Toggle Flashlight</pre> |
| | + | <pre class="constraint-style">Constraints |
| | + | |
| | + | Screen: Off</pre> |
| | + | |
| | + | ''' Setup ''' |
| | + | |
| | + | To configure MacroDroid as the default assist app: |
| | + | 1. Go to device Settings |
| | + | 2. Navigate to Apps > Default apps > Digital assistant app (path may vary by device) |
| | + | 3. Select MacroDroid as the assist app |
| | + | |
| | + | Alternatively, MacroDroid will prompt you to configure this when you add the trigger. |
| | + | |
| | + | ''' Notes ''' |
| | + | |
| | + | * On some devices, this trigger may also fire when long pressing the home button, depending on the device's button configuration |
| | + | * When MacroDroid is set as the default assist app, the normal power button long press functionality (power menu) will be replaced by this trigger |
| | + | * A warning will be displayed in the macro editor if MacroDroid is not configured as the default assist app |
| | + | * This trigger may conflict with manufacturer-specific power button behaviors (like Samsung's Bixby or Google Assistant shortcuts) |
| | + | |
| | + | ''' See Also ''' |
| | + | |
| | + | * [[Trigger: Power Button Toggle]] |
| | + | * [[Trigger: Home Button Long Press]] |
| | + | * [[Trigger: Volume Button Press]] |