Difference between revisions of "Trigger: Autosync changed"
| Line 1: | Line 1: | ||
| − | <pre class="header-style"> | + | <pre class="header-style">The Autosync Changed trigger fires when the auto sync (automatic background data syncing) setting on the device changes. This allows you to respond when the user enables or disables automatic synchronization for accounts.</pre> |
| − | Autosync | ||
| − | + | ''' Options ''' | |
| − | </pre> | + | |
| + | * '''Enabled''' - Trigger fires when auto sync is turned on | ||
| + | * '''Disabled''' - Trigger fires when auto sync is turned off | ||
| + | |||
| + | ''' Examples ''' | ||
| + | |||
| + | ''Example 1: Notification When Sync Disabled'' | ||
| + | <pre class="trigger-style">Triggers | ||
| + | |||
| + | Autosync Changed (Disabled)</pre> | ||
| + | <pre class="action-style">Actions | ||
| + | |||
| + | Notification: Auto sync has been disabled</pre> | ||
| + | |||
| + | ''Example 2: Log Sync State Changes'' | ||
| + | <pre class="trigger-style">Triggers | ||
| + | |||
| + | Autosync Changed (Enabled)</pre> | ||
| + | <pre class="action-style">Actions | ||
| + | |||
| + | Write to File: Auto sync enabled at {hour:minute:second}</pre> | ||
| + | |||
| + | ''' Notes ''' | ||
| + | |||
| + | * The trigger monitors the Master Sync Automatically setting via the ContentResolver | ||
| + | * Only one option can be selected per trigger instance - create separate triggers if you need to respond to both enabling and disabling | ||
| + | * The trigger uses a status change listener to efficiently monitor the setting without polling | ||
| + | * The trigger only fires when the state actually changes (not on repeated settings to the same value) | ||
| + | * This monitors the global auto sync setting, not individual account sync settings | ||
| + | |||
| + | ''' See Also ''' | ||
| + | |||
| + | * [[Action:_Autosync_On_Off|Autosync On/Off Action]] | ||
| + | * [[Constraint:_Autosync|Autosync Constraint]] | ||
Revision as of 21:34, 5 January 2026
The Autosync Changed trigger fires when the auto sync (automatic background data syncing) setting on the device changes. This allows you to respond when the user enables or disables automatic synchronization for accounts.
Options
- Enabled - Trigger fires when auto sync is turned on
- Disabled - Trigger fires when auto sync is turned off
Examples
Example 1: Notification When Sync Disabled
Triggers Autosync Changed (Disabled)
Actions Notification: Auto sync has been disabled
Example 2: Log Sync State Changes
Triggers Autosync Changed (Enabled)
Actions
Write to File: Auto sync enabled at {hour:minute:second}
Notes
- The trigger monitors the Master Sync Automatically setting via the ContentResolver
- Only one option can be selected per trigger instance - create separate triggers if you need to respond to both enabling and disabling
- The trigger uses a status change listener to efficiently monitor the setting without polling
- The trigger only fires when the state actually changes (not on repeated settings to the same value)
- This monitors the global auto sync setting, not individual account sync settings
See Also