Trigger: Screen content
This trigger will fire when certain textual content appears on screen or is removed from the screen (as configured). Note that this trigger may not work for all apps/screen content as often text will be non-readable (for example if rendered within a game).
Options
- Text to Match / View ID to Match - The text string or Android view ID to search for on screen. Supports Magic Text for dynamic matching.
- Match Text Content - Match against visible text content on the screen
- Match View ID - Match against Android view IDs (for advanced users who know the specific view identifiers)
- Enable Regex - Enable regular expression pattern matching for complex text patterns
- Ignore Case - When enabled (default), text matching is case-insensitive. Not available when regex is enabled.
- On Screen - Trigger fires when the specified content appears on screen
- Off Screen - Trigger fires when the specified content is removed from screen
- Select Applications - Limit detection to specific applications, or monitor all applications
- Include Overlays - Include overlay windows in content detection (Pro feature)
Requirements
- UI Interaction Accessibility Service must be enabled
- Pro version required for "Include Overlays" feature
Examples
Example 1: Low battery notification from app
Trigger when a specific app shows "Low Battery" text:
Triggers Screen Content (On Screen): "Low Battery" Applications: Smart Home App
Actions Display Notification: "Device battery is low" Send SMS to self: "Check smart home device battery"
Example 2: Auto-dismiss dialog
Automatically handle a recurring dialog that appears on screen:
Triggers Screen Content (On Screen): "Rate this app"
Actions UI Interaction: Click "Not Now"
Example 3: Track work status
Set a variable when work status changes:
Triggers Screen Content (On Screen): "Available" Applications: Slack
Actions Set Variable: [work_status] = "available"
Notes
- The trigger uses MacroDroid's UI accessibility service to query screen content
- A delay of 500ms is applied between consecutive triggers to prevent rapid firing
- Selecting specific applications is recommended to improve performance and reduce false triggers
- A warning is displayed when "All Applications" is selected due to potential performance impact
- Text rendered as graphics (such as in games or images) cannot be detected
- The screen content update rate can be configured in MacroDroid settings
- Magic Text can be used in the text to match field for dynamic content matching
- On Android 15+ apps can block access to reading the screen content via the accessibility service.
See Also