Difference between revisions of "Trigger: System Setting Change"

Line 1: Line 1:
<pre style="background-color: #EEEEEE; color: Black; border-radius: 10px; padding: 10px;">This trigger fires when a system setting from the device's system, secure or global settings table is updated.
+
<pre class="header-style">This trigger will fire when a system setting from the device's system, secure or global settings table is updated. This allows you to react to changes in Android system settings made by the user or other applications.</pre>
</pre><br>
 
  
'''Example Usage #1'''<br/>
+
''' Options '''
  
<pre style="background-color: #FF5959; color: white; border-radius: 10px; padding: 10px;">
+
* '''Setting Tables''': Select which settings tables to monitor:
Triggers
+
** '''System''': General system settings (e.g., screen brightness, font size)
 +
** '''Global''': Device-wide settings that apply to all users (e.g., airplane mode, Bluetooth)
 +
** '''Secure''': Security-related settings (e.g., accessibility services, location providers)
  
System Setting Change .. Any
+
* '''Setting Pattern''': Optionally specify a pattern to match specific setting names:
</pre>
+
** Leave empty to trigger on any setting change in the selected tables
<pre style="background-color: #3498DB; color: white; border-radius: 10px; padding: 10px;">
+
** Enter a specific setting name to only trigger when that setting changes
Actions
+
** Supports Magic Text for dynamic pattern matching
  
Set Variable .. system_setting_category: [system_setting_category]
+
* '''Enable Regex''': When enabled, the setting pattern is treated as a regular expression
Set Variable .. system_setting_key: [system_setting_key]
 
Set Variable .. system_setting_value: [system_setting_value]
 
Popup Message .. [lv=system_setting_category]:[lv=system_setting_key]:[lv=system_setting_value]
 
</pre>
 
<pre style="background-color: #00838F; color: white; border-radius: 10px; padding: 10px;">
 
Local variables
 
  
system_setting_category    [Var type - String]
+
''' Local Variables '''
system_setting_key          [Var type - String]
 
system_setting_value        [Var type - String]
 
</pre><br>
 
  
'''Example Usage #2'''<br/>
+
This trigger provides the following local string variables:
  
<pre style="background-color: #FF5959; color: white; border-radius: 10px; padding: 10px;">
+
* '''system_setting_category''': The category of the setting that changed ("System", "Global", or "Secure")
Triggers
+
* '''system_setting_key''': The name/key of the setting that was modified
 +
* '''system_setting_value''': The new value of the setting
  
System Setting Change .. accessibility_display_inversion_enabled
+
''' Configuration '''
</pre>
 
<pre style="background-color: #3498DB; color: white; border-radius: 10px; padding: 10px;">
 
Actions
 
  
Set Variable .. system_setting_category: [system_setting_category]
+
A searchable dropdown is provided showing all available settings on your device, organized by their current values and categories. Selecting a setting from the list will automatically populate the pattern field and select the appropriate settings table.
Set Variable .. system_setting_key: [system_setting_key]
 
Set Variable .. system_setting_value: [system_setting_value]
 
If system_setting_category = Secure AND system_setting_key = accessibility_display_inversion_enabled
 
  If system_setting_value = 1
 
    Popup Message .. Color inversion on
 
  Else
 
    Popup Message .. Color inversion off
 
</pre>
 
<pre style="background-color: #00838F; color: white; border-radius: 10px; padding: 10px;">
 
Local variables
 
  
system_setting_category     [Var type - String]
+
''' Examples '''
system_setting_key          [Var type - String]
+
 
system_setting_value       [Var type - String]
+
  <pre class="trigger-style">Triggers
 +
 
 +
System Setting Change (accessibility_display_inversion_enabled)</pre>
 +
  <pre class="action-style">Actions
 +
 
 +
If [system_setting_value] = 1
 +
    Notification: Color Inversion Enabled
 +
Else
 +
     Notification: Color Inversion Disabled
 +
End If</pre>
 +
 
 +
''Notify when display color inversion is toggled.''
 +
 
 +
----
 +
 
 +
  <pre class="trigger-style">Triggers
 +
 
 +
System Setting Change (Any)</pre>
 +
  <pre class="action-style">Actions
 +
 
 +
Popup Message: Setting Changed
 +
    {system_setting_category}: {system_setting_key} = {system_setting_value}</pre>
 +
 
 +
''Debug macro to log all system setting changes.''
 +
 
 +
''' Notes '''
 +
 
 +
* At least one settings table (System, Global, or Secure) must be selected.
 +
* The trigger monitors the Android ContentResolver for changes to the settings database.
 +
* Some settings may require specific permissions to read their values.
 +
* This trigger is useful for responding to user actions in Android Settings or changes made by other apps.
 +
* Common settings to monitor include: screen_brightness, airplane_mode_on, bluetooth_on, wifi_on, location_mode, accessibility_enabled.
 +
* Wild card patterns can be used to match multiple settings with similar names.
 +
 
 +
''' See Also '''
 +
 
 +
* [[Action:_System_Setting|System Setting Action]]

Revision as of 21:38, 7 January 2026

This trigger will fire when a system setting from the device's system, secure or global settings table is updated. This allows you to react to changes in Android system settings made by the user or other applications.

Options

  • Setting Tables: Select which settings tables to monitor:
    • System: General system settings (e.g., screen brightness, font size)
    • Global: Device-wide settings that apply to all users (e.g., airplane mode, Bluetooth)
    • Secure: Security-related settings (e.g., accessibility services, location providers)
  • Setting Pattern: Optionally specify a pattern to match specific setting names:
    • Leave empty to trigger on any setting change in the selected tables
    • Enter a specific setting name to only trigger when that setting changes
    • Supports Magic Text for dynamic pattern matching
  • Enable Regex: When enabled, the setting pattern is treated as a regular expression

Local Variables

This trigger provides the following local string variables:

  • system_setting_category: The category of the setting that changed ("System", "Global", or "Secure")
  • system_setting_key: The name/key of the setting that was modified
  • system_setting_value: The new value of the setting

Configuration

A searchable dropdown is provided showing all available settings on your device, organized by their current values and categories. Selecting a setting from the list will automatically populate the pattern field and select the appropriate settings table.

Examples

Triggers

System Setting Change (accessibility_display_inversion_enabled)
Actions

If [system_setting_value] = 1
    Notification: Color Inversion Enabled
Else
    Notification: Color Inversion Disabled
End If

Notify when display color inversion is toggled.


Triggers

System Setting Change (Any)
Actions

Popup Message: Setting Changed
    {system_setting_category}: {system_setting_key} = {system_setting_value}

Debug macro to log all system setting changes.

Notes

  • At least one settings table (System, Global, or Secure) must be selected.
  • The trigger monitors the Android ContentResolver for changes to the settings database.
  • Some settings may require specific permissions to read their values.
  • This trigger is useful for responding to user actions in Android Settings or changes made by other apps.
  • Common settings to monitor include: screen_brightness, airplane_mode_on, bluetooth_on, wifi_on, location_mode, accessibility_enabled.
  • Wild card patterns can be used to match multiple settings with similar names.

See Also