Trigger: Power Button Long Press
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.
Requirements
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
Triggers Power Button Long Press
Actions Launch Application: Google Assistant
Example 2: Toggle flashlight with power button long press
Triggers Power Button Long Press
Actions Toggle Flashlight
Constraints Screen: Off
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