Orgzly auto syncronisation is not yet implemented for remote repositories such as local repos synced with, e.g., syncthing. See orgzly/orgzly-android#8.
While other scripts proposed in the linked issue fix the problem, I've compressed those into a simple script.
The script is meant for use in termux. Install the Termux-boot plugin. Then put the script into ~/.termux/boot
. Now it should automatically run all the time after Android startup.
I use the script for the /sdcard/org directory. This is the directory of my local repository. Insert the path you use there.
Nice, this is awesome -- even periodically (e.g every hour) running
orgzly_sync
(if you don't wanna mess with inotify etc) is already going to massively reduce the chances of a conflict.Btw I'm not sure
is going to work as you expect it to --
am broadcast
doesn't receive the result back from orgzly. In fact, even if you make a typo in the broadcast target, it still returns code 0, unfortunately.