EmbeddedFileSource

constructor(@NonNull fileDataProvider: DataProvider, @NonNull fileName: String, @Nullable fileDescription: String)

Constructs an embedded file source with data served from DataProvider.

Parameters

fileDataProvider

Provider for file's data that will be saved in the document.

fileName

User displayable name of the file.

fileDescription

The optional description of the file. If set, it will override the file annotation's contents (getContents).


constructor(@NonNull fileUri: Uri, @NonNull fileName: String, @Nullable fileDescription: String)

Constructs an embedded file source with data served from file content provider URI.

Parameters

fileUri

A content provider URI with supported scheme (content:// or file://).

fileName

User displayable name of the file.

fileDescription

The optional description of the file. If set, it will override the file annotation's contents (getContents).


constructor(@NonNull fileData: Array<Byte>, @NonNull fileName: String, @Nullable fileDescription: String)

Constructs an embedded file source with data served from memory.

Parameters

fileData

File data that will be saved in the document.

fileName

User displayable name of the file.

fileDescription

The optional description of the file. If set, it will override the file annotation's contents (getContents).