go-vikunja / app

MIT License
270 stars 23 forks source link

Feature Request: Background Sync #20

Closed KierenConnell closed 1 year ago

KierenConnell commented 2 years ago

Currently, if I add tasks, or make changes to tasks in the WebUI, they don't get pushed to the Android app until the app is manually opened.

I'd like a setting to define a sync interval (15mins, 30mins, hour, daily) that occurs regardless of if the app has been opened recently.

Benimautner commented 2 years ago

What do you need this feature for? I'm presuming for the notification feature, so you get notifications even when you haven't synced? Tasks are not saved on the phone at all, so syncing them for anything other than the notifications does not make sense. They are always manually fetched. I'll look into background syncing for the notifications though.

KierenConnell commented 2 years ago

I want them exactly for notifications. I don't want to create a task in the WebUI or Windows app and then have to remember to go open the app on my phone (And if they're shared tasks, or assigned tasks remember or remind someone to go open their app) before the task syncs across and shows reminders.

Having the ability to have tasks sync both directions on a schedule would also be a very useful feature - If I have multiple tasks, and my phone goes offline, I can still mark the tasks as complete (or update them) then when my phone is online, the sync will occur (and I'd assume a last modified like timestamp would be checked) and the changes would be sync'd back.

kolaente commented 2 years ago

A real offline sync can be rather complicated to implement because you'll need to handle conflicts between changes done offline and on the server while the device didn't have access to the internet. There are solutions for that but it's a bit more complicated.

In the long-term we'd like to have something like that for the web interface as well so it might make sense to consolidate the implementation to re-use parts of it for all clients.

k9withabone commented 2 years ago

@Benimautner You may want to look at workmanager for background operations.

Benimautner commented 1 year ago

@KierenConnell this has been added in the newest version 0.0.25-alpha. Would you mind trying it out?

Benimautner commented 1 year ago

Closed due to inactivity. Feature has been implemented.