Trigger: Intent Received
The Intent Received trigger fires when an intent with the specified action is broadcast by another application. This allows MacroDroid to respond to system events and inter-app communication through Android's intent mechanism. You can pattern match against extra parameter values and store these values into variables.
Options
- Action: The intent action string to listen for (e.g., "android.intent.action.BATTERY_LOW" or a custom action from another app).
- Extras: Optionally configure one or more extra parameters to match:
- Parameter Name: The name/key of the intent extra to check
- Value: The pattern to match against (supports wildcards)
- Variable: Optionally store the extra's value into a string variable with optional dictionary keys
- Enable Regex: When enabled, value patterns are treated as regular expressions instead of wildcard patterns.
Examples
Example 1: Respond to Custom App Intent
Triggers Intent Received - com.example.app.CUSTOM_EVENT
Actions Popup Message - Custom event received!
Triggers when another app broadcasts the custom intent "com.example.app.CUSTOM_EVENT".
Example 2: Capture Intent Extra into Variable
Triggers Intent Received - com.example.app.DATA_UPDATE Extra: data_value = * (save to: received_data)
Actions
Popup Message - Received: {v=received_data}
Captures the "data_value" extra from the intent and stores it in a variable.
Notes
- Intent actions are case-sensitive strings.
- Common system intent actions can be found in Android documentation.
- The wildcard character (*) can be used in value patterns to match any content.
- Multiple extra parameters can be configured, each with their own pattern and variable.
- Each intent action is registered only once, even if multiple macros use the same action - MacroDroid efficiently shares the broadcast receiver.
- Supports both local and global variables for storing extra values.
- Dictionary keys can be specified when saving to array/dictionary variables.
Common Intent Actions
android.intent.action.BATTERY_LOW- Battery is lowandroid.intent.action.BATTERY_OKAY- Battery is okayandroid.intent.action.POWER_CONNECTED- Power connectedandroid.intent.action.POWER_DISCONNECTED- Power disconnectedandroid.provider.Telephony.SMS_RECEIVED- SMS receivedandroid.intent.action.PACKAGE_ADDED- App installed
See Also