Autosync provides an interface (API) that allows automation apps like Tasker, Automate, MacroDroid,… to setup various automation rules. Thanks to this interface any app can send a special message (called “Intent” on Android) to Autosync. An Intent contains an action name and optional parameters (called Intent extras on Android).
It may be dangerous to let some random apps trigger tasks in Autosync. Therefore a secret code must be sent along with the intent. The initial secret code is generated by Autosync automatically, but you can change it. You can even set it to an empty value which effectively disables the protection (not recommended!).
By default the Automation interface is disabled. You have to enable it in the app settings.
Force sync, the same as when the user manually taps the Sync button in the app. No retry attempts will be made if sync fails.
folderPairs param is set, only the selected folder pairs are synced. Regardless of whether they are enabled or not.
With this param you can force sync disabled folder pairs that are normally not synced at all.
Enable or disable autosync, the same as when the user toggles the “Enable autosync” switch at the top of the “Synced folders” tab or in the app settings Synchronization
folderPairs param is set, these actions enable/disable the “Automatic background sync” switch in the selected folder
pair config. The app-wide “Enable autosync” switch is kept as it is.
Enable/disable the listed folder pairs.
folderPairs param must be set for these actions to take effect.
Required parameter, must match what’s set in the Autosync app settings > Automation > Secret code
List of folder pair names, separated by commas
,. The given action will act only on the selected folder pairs.
* can be used to do pattern matching.
? matches one arbitrary character,
* matches zero, one or arbitrary number of any characters.
folderPairs: Test folder, Screenshots, DCIM
selects three folder pairs named “Test folder”, “Screenshots” and “DCIM”.
folderPairs: Screen*, *folder
selects folder pairs with names starting with “Screen” or ending with “folder”, like “Screenshots”, “Screening”, “Test folder”.
Folder pairs without names cannot be selected by this parameter with one exception:
selects ALL existing folder pairs defined in Autosync, regardless of their names.
You have to tell the automation apps where to send the constructed Intent to. In Tasker you create a new action. When asked, choose the acton category System, then Send Intent. In addition to the action name and extras described above you need to tell Tasker to use
- Target: Broadcast Receiver