Changes

no edit summary
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 is on by default, it means that contact updates such as adding phone numbers or deleting contact info and other sync features.
     −
This trigger will fire when it is turned on or off depending on the configuration option.
+
''' 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]]