We have thought about that ourselves, and find it an interesting and challenging task. After some thoughts, we have found several reasons why it would be better to make a separate app for WebDAV file synchronization. The algorithms are quite different, but the dav4android library could be reused.
Unfortunately, file synchronization is much more complex and error-prone (because of conflicts where we don’t have the stateful information like we have it from the Contacts and Calendar Providers), but it should be possible.
Also, there are some challenges and caveats: for instance, file transfers would have to be resumble, and as far as I know, there’s no way to resume
PUT requests (= file uploads). The newer
PATCH method is not always supported and has some disadvantages.