logoalt Hacker News

Macha05/14/20252 repliesview on HN

This is not the same functionality that Nextcloud provides though. This is one time upload of manually selected files, not ongoing passive sync of an entire directory tree.


Replies

tadfisher05/14/2025

Ongoing sync is still possible through ACTION_OPEN_DOCUMENT_TREE [0], and using ContentResolver.takePersistableUriPermission [1] to maintain long-lived access to that directory. Enumerating files is slow but that is not a major concern when the use-case is a background sync, and you can drop down to ContentResolver APIs to reduce the number of IPC calls when enumerating.

[0]: https://developer.android.com/training/data-storage/shared/d...

[1]: https://developer.android.com/reference/android/content/Cont...

show 1 reply
izacus05/14/2025

The same picker has the functionality of allowing access to a full directory.