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

Sync Delays #7

Closed phuyuk closed 5 years ago

phuyuk commented 5 years ago

Hours can pass before a calendar event is picked up by DecSyncCC. Checking 'Last synced' times in Settings>Accounts seems to confirm my observation; for example, yesterday I noticed that one of my devices (SM-P900, Lineage 13) hadn't synced in more than 6 hours.

Is this expected behavior? Are you planning to add a 'sync frequency' setting?

phuyuk commented 5 years ago

Update: Inexplicably, DecSyncCC is now syncing within moments of creating/editing calendar entries. So, I'm wondering, if the process was somehow stopped/killed(?)

39aldo39 commented 5 years ago

The sync frequency is set to once every hour (this is the minimum allowed interval in recent Android versions). I noticed some long delays by myself as well. I don't really know why it happens. If I remember correctly, opening the app brought it on track again. A possibility could be that the app doesn't requests the periodic sync enough. However, when I restarted my phone it synced correctly.

About your update: Android initiates a sync immediately after you create/edit a calendar entry. Executing the updates from other devices may have delays.

phuyuk commented 5 years ago

I forgot to mention - and this might be a clue - that yesterday, when syncing seemed to be unresponsive, I tried the following: Settings>Accounts>DecSync Calendars>"Sync now". It seemed to have no effect - the "Last synced" time did not change. Whereas now, when I click on "Sync now", the time of last sync is immediately updated.

39aldo39 commented 5 years ago

I think I found the problem: App Standby. Since Android 6.0, the sync adapter is only run around once a day if the app is not opened for a while. The app has to ask for an exception to sync more often.

39aldo39 commented 5 years ago

I have implemented a dialog to ask for an exception to App Standby.