by Thomas Keil
Instant 2-way synchronization of a single directory between multiple Android devices via a central server using FolderSync.
- watches for changes in the local file system and triggers FolderSync via plug-in
- implements a timeout (1 minute for now) for synchronization to save data
- sends a cloud message to your Google account on local changes
- listens to cloud messages from your Google account to trigger sync, compares md5 hashes to skip when already in sync
- listener is stopped when losing network connection and resumed when back online
- persistent settings, saved in a json file on the internal storage
- this flow is in a working-for-me state, not to be considered stable
- FolderSync must be configured separately, for 2-way synchronization, notifications enabled (at least the one while running, the sync-finished detection relies on that)
- conflict handling is done by FolderSync
- the directory selected on first run must be identical to the directory synchronized by the FolderSync plug-in
- for now only a single directory is supported, adaption towards multiple directories should be possible
The intended use case is a single directory with multiple small text files (I use it for an Orgzly local repository). It might work with subdirectories, as long as the full hashtable fits into the cloud message payload (2kb). I synchronize with a Nextcloud server, it should work with anything compatible with FolderSync.
Feel free to comment! Suggestions for improvement are always welcome!