Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Automatic sync for webdav #625

Closed
Nebucatnetzer opened this issue Oct 23, 2019 · 4 comments
Closed

Automatic sync for webdav #625

Nebucatnetzer opened this issue Oct 23, 2019 · 4 comments

Comments

@Nebucatnetzer
Copy link

I love the integration of webdav.
However is there a way to automatically sync the notebooks?
Or is there an intent so that I can trigger it from Tasker?

am startservice --user 0 -a com.orgzly.intent.action.SYNC_START com.orgzly/com.orgzly.android.sync.SyncService

Doesn't work.

@NiceFeather
Copy link

NiceFeather commented Oct 26, 2019

See issue #8

Sure, that's a good idea, just like ownCloud desktop client. I think the manually swipping down to sync is a temporal workaround, it would all has the same behaviours with local repository eventually.

@nevenz
Copy link
Member

nevenz commented Oct 27, 2019

It's part of #8 as @NiceFeather said. Auto-sync is restricted to Directory repository type as there were issues with Dropbox syncing. It was too easy to hit their API way too much.

There is a plan to queue syncing requests (I plan to start playing with WorkManager for that soon), but perhaps this should be expedited as I assume a lot of WebDAV users will be using a local storage anyway (like Nextcloud), myself included.

Perhaps a per-repository option could be added to control auto-syncing.

am startservice --user 0 -a com.orgzly.intent.action.SYNC_START com.orgzly/com.orgzly.android.sync.SyncService

You might need to use start-foreground-service.

@Nebucatnetzer
Copy link
Author

I wasn't able to get it working with the shell command in Tasker. It always showed an error even though the command worked with adb shell.
I implemented now this: #8 (comment) and it's working.
I don't know if we want to close this issue in favour of #8 since my problem is now solved and #8 basically covers everything already?

@nevenz
Copy link
Member

nevenz commented Oct 27, 2019

I implemented now this: #8 (comment) and it's working.

Ah yes, com.orgzly.android.ActionReceiver was actually created for this and is preferable instead of using SyncService directly.

I don't know if we want to close this issue in favour of #8 since my problem is now solved and #8 basically covers everything already?

Sounds good, I'll tag it as a duplicate.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants