Changes

no edit summary
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 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).</pre>
This trigger will fire when certain textual content appears on screen or is removed (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 '''
</pre>
  −
<br>
  −
'''Example Usage'''<br/>
     −
<pre style="background-color: #AC2424; color: white; border-radius: 10px; padding: 10px;">
+
* '''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.
Triggers
+
* '''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 '''
   −
</pre><br>
+
* UI Interaction Accessibility Service must be enabled
<pre style="background-color: #1665B0; color: white; border-radius: 10px; padding: 10px;">
+
* Pro version required for "Include Overlays" feature
Actions
      +
''' Examples '''
   −
</pre><br>
+
'''Example 1: Low battery notification from app'''
<pre style="background-color: green; color: white; border-radius: 10px; padding: 10px;">
  −
Constraints
      +
Trigger when a specific app shows "Low Battery" text:
   −
</pre><br>
+
  <pre class="trigger-style">Triggers
<pre style="background-color: teal; color: white; border-radius: 10px; padding: 10px;">
  −
Local variables
      +
Screen Content (On Screen): "Low Battery"
 +
Applications: Smart Home App</pre>
 +
  <pre class="action-style">Actions
   −
</pre><br>
+
Display Notification: "Device battery is low"
 +
Send SMS to self: "Check smart home device battery"</pre>
 +
 
 +
'''Example 2: Auto-dismiss dialog'''
 +
 
 +
Automatically handle a recurring dialog that appears on screen:
 +
 
 +
  <pre class="trigger-style">Triggers
 +
 
 +
Screen Content (On Screen): "Rate this app"</pre>
 +
  <pre class="action-style">Actions
 +
 
 +
UI Interaction: Click "Not Now"</pre>
 +
 
 +
'''Example 3: Track work status'''
 +
 
 +
Set a variable when work status changes:
 +
 
 +
  <pre class="trigger-style">Triggers
 +
 
 +
Screen Content (On Screen): "Available"
 +
Applications: Slack</pre>
 +
  <pre class="action-style">Actions
 +
 
 +
Set Variable: [work_status] = "available"</pre>
 +
 
 +
''' 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 '''
 +
 
 +
* [[Action:_UI_Interaction|UI Interaction]]
 +
* [[Trigger: Notification]]