Skip to content

Exposing files to other applications

Peter edited this page Mar 21, 2024 · 12 revisions

Android

We're using AbstractFileProvider (here) which returns ParcelFileDescriptor. Depending on the Android version and whether the file size is known, the ParcelFileDescriptor is either a pipe created with ParcelFileDescriptor.createPipe() or an object that supports seeking which is created using StorageManager.openProxyFileDescriptor.

TODO: Implement Storage Access Framework (SAF)

iOS

One suggestion was to use UIActivityItemProvider to provide a Pipe object. I haven't yet found an example of how this could work, normally there are examples how the UIActivityItemProvider would provide a URI to a file that is to be downloaded, which is not what we want. Even if possible, Pipe isn't the ideal object as it doesn't support seeking nor writing. Perhaps there is another object for that?

This page mentions "The Document Provider" and "The File Provider" extensions. Further info about the File Provider extension and it's "replicated" and "non replicated" variants here

There is a Nextcloud iOS app that uses the NSFileProviderExtension.

In this video 1m:12s they mention apple is deprecating FUSE deprecating kernel extensions which are needed for the existing fuse implementations (however, this project works around that by providing a fuse-to-nfs layer, an idea possibly worth exploring further).

There is also Finder Sync but that's only for macOS.

There is an example of the replicated file provider extension from Apple.

Windows

Shell Namespace Extensions look interesting.