AttachmentStorageHelper

class AttachmentStorageHelper(context: Context, storageHelper: StorageHelper = StorageHelper(), attachmentFilter: AttachmentFilter = AttachmentFilter())

Handles querying device storage for attachment metadata and converting between AttachmentMetaData and the SDK Attachment model.

Parameters

context

The context of the app, used to fetch files and media.

storageHelper

Queries the device's content providers for files and media.

attachmentFilter

A filter that is used to filter out attachments that will not be accepted by the backend.

Constructors

Link copied to clipboard
constructor(context: Context, storageHelper: StorageHelper = StorageHelper(), attachmentFilter: AttachmentFilter = AttachmentFilter())

Types

Link copied to clipboard
object Companion

Functions

Link copied to clipboard

Loads file metadata from the system, filtered against file types accepted by the backend.

Link copied to clipboard

Loads media metadata from the system, filtered against file types accepted by the backend.

Link copied to clipboard

Partitions metadata into resolvable and unresolvable items.

Link copied to clipboard

Resolves deferred attachments by copying their source content into local cache files.

Link copied to clipboard
Link copied to clipboard

Converts a list of AttachmentMetaData into lightweight Attachments for preview.