39aldo39 / DecSyncCC

Android app to sync contacts, calendars and tasks without a server using DecSync
GNU General Public License v3.0
241 stars 10 forks source link

no automatic synchronization on incoming file changes #53

Open wolfgang371 opened 3 years ago

wolfgang371 commented 3 years ago

I have two mobiles, both with DecSync CC and Syncthing. They both use the same DecSync calendar account. Also, they both synchronize on a common server. Any time I change any item in one of the two calendars it gets synced to my server after some seconds, so this part (automatic sync on outgoing calendar changes) is fine.

However, the calendar of the other mobile doesn't get updated automatically; I have to force it by manually pressing the "refresh" button in DecSync.

wolfgang371 commented 3 years ago

It seems that there is no immediate synchronization, but sometimes after 30min, sometimes 2h there happens an automatic sync... I probably was not patient enough...

cryptono commented 3 years ago

+1, having the same issue. The main reason right now from keeping me to further use DecSync.

39aldo39 commented 3 years ago

Yes, on Android a sync occurs every 60 minutes. It is currently not possible to detect changes immediately and Android doesn't allow the interval to be too low. However, in a recent update I improved the stability of the polling as Android did sometimes force a very long interval, which was probably the main issue.

wolfgang371 commented 3 years ago

Thanks for the update! Meanwhile I use the new version on both mobiles; it still takes sometimes several hours, though.

40417256 commented 3 years ago

How about adding a configurable automatic refresh on top of the manual one ?

wolfgang371 commented 3 years ago

You mean a configurable sync. polling period as a feature? Hm. From what I recall from my test at the top of this issue it seems there's (currently) no notification back from the syncthing'ed incoming calendar files to DecSyncCC. On a standard linux there's inotifywait - I wonder if it's available on Andoid as well? That would be a more battery efficient solution on the one hand side and a faster one on the other as well.

39aldo39 commented 3 years ago

There is not really a good inotifywait equivalent on Android. There is something similar (but only for older Android versions I think), but that requires a constant background process which is undesirable.

I looked at the enforced intervals again and apparently the minimum allowed time is now 15 instead of 60 minutes, so I did change that.

adam4235 commented 1 year ago

But in using Decsync CC I'm also using Syncthing on my phone and computer to sync the files. That already has a constant background process running to do the sync, right? And it syncs pretty fast. So why would be undesirable to add a second background process to sync the files that came from Syncthing with the phones's contacts / calendar / tasks?