prepare File For Sharing
open fun prepareFileForSharing(@NonNull context: Context, @NonNull fileDataProvider: DataProvider, @Nullable fileName: String): Single<Uri>
Writes file to directory backed by DocumentSharingProvider.
- Scheduler:
- Method does not operate by default on a particular Scheduler.
Return
Single emitting Uri that can be used for sharing the file to other apps or an error if the file could not be exported.
Parameters
context
Context to use.
file Data Provider
Data provider with file data.
file Name
Optional file name used for sharing (this is the shared file name as seen by other apps).