Add a tasker capability to manually trigger / change sync settings
There seem to be some isses with sync on local network, e.g.
Idea from my side: Add a tasker action plugin for DAVdroid for:
- trigger manual sync
- change sync interval
This would make DAVdroid more flexible.
Just some use cases that would profit from this:
- when I connect to my home wifi, immediately trigger a sync
- limit syncing to more than one SSID
- setup sync chains (e.g. with 5mins delay: tablet - phone - tablet) so all devices are synced at once
- only sync in certain times (e.g. only during daytime)
This would of course be possible, although DAVdroid would require more privileges for that (e.g. to see when network has changed etc.). It would also increase complexity and I don't know whether this is really needed.
If you're going to write a patch, please let us know before so that we can coordinate.
With tasker, DAVdroid would not need any more privileges and code (except the plugin interface)!
Tasker is an automatisation tool that is quite flexible - and you can chose from many triggers (like on connect to a certain network / time intervals / ...) and actions. Many actions are provided by tasker, but other 3rd-party-apps can provide these actions as well.
My point is that with a tasker plugin, all my use case examples can be handled by the user itself. However, I have to admit that tasker is quite a complex tool that is not fool-proof - so it not widely spread, and just used by some "geeks" - but it has 1000k installs, and people who want to use DAVdroid are not beginners as well
Sorry that I can only contribute the idea. I have experience in coding for real time embedded systems, but no android experience...
I'd like to pick up the general idea cause I think that there are quite a lot davdroid users that do use tasker as well.
However I think there would be an easier way than a plugin. Tasker supports triggering intents so davdroid only needs to provide the appropriate intent and tasker can start the action.
MyAndroidTools can show intents (as broadcast receiver). Davdroid unfortunately only offers 5 intents here and none of them sound like they update calendars or contacts ...
It shouldn't require any additions in DAVdroid. Any app can cause DAVdroid to sync by requesting the sync from the ContentResolver (instead of an Intent). So in my opinion, there should be a "sync account(s)" action in Tasker or a Tasker plugin for that.
Sounds interesting but does not really help me to find a solution.
Is it possible to trigger a sync from command line?
I don't know why hut on my device often I cannot trigger sync from account settings but only from within the davdroid app
sorry I did not mention, but I found some solution that did exactly what I was missing.
The app is called Syncer - the sync widget.
I do not know which fancy things it is able to do and how well it works. Most important thing (and the only feature I ever tried): it provides a tasker/locale interface you can use to trigger the sync of any account.
However it would be nice if this simple thing would be provided by tasker (or davdroid, I don't know what would be the correct implementation)