Changes

no edit summary
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>
     −
'''Example Usage #1'''<br/>
+
''' Options '''
   −
<pre style="background-color: #E53935; 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><br>
+
** 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><br>
  −
<pre style="background-color: #00838F; color: white; border-radius: 10px; padding: 10px;">
  −
Local variables
     −
system_setting_category
+
''' Magic Text '''
system_setting_key
  −
system_setting_value
  −
</pre><br>
      +
When triggered the following magic text values are available to be used:
    +
* '''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
   −
'''Example Usage #2'''<br/>
+
''' Configuration '''
   −
<pre style="background-color: #E53935; color: white; border-radius: 10px; padding: 10px;">
+
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.
Triggers
     −
System Setting Change .. accessibility_display_inversion_enabled
+
''' Examples '''
</pre><br>
  −
<pre style="background-color: #3498DB; color: white; border-radius: 10px; padding: 10px;">
  −
Actions
     −
Set Variable .. system_setting_category: [system_setting_category]
+
   <pre class="trigger-style">Triggers
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><br>
  −
<pre style="background-color: #00838F; color: white; border-radius: 10px; padding: 10px;">
  −
Local variables
     −
system_setting_category
+
System Setting Change (accessibility_display_inversion_enabled)</pre>
system_setting_key
+
  <pre class="action-style">Actions
system_setting_value
+
 
 +
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]]