loadFileAttachment

open fun loadFileAttachment(    @NonNull context: Context,     @NonNull intent: Intent,     @Nullable callback: IAttachmentLoaderCallback)

Call this method to load a file attachment presented by com.streamwide.smartms.lib.core.data.item.FileAttachment.

This method can return a file, an image or a video attachment based on mime type.

This method can be executed in a main thread since it is already done in an AsyncTask.

Parameters

context

The application context.

intent

An intent that contains all necessary data to extract a file attachment.

callback

It will be invoked when the file has been successfully loaded or when an error has occurred. Other details are delivered in the IAttachmentLoaderCallback callback.


open fun loadFileAttachment(    @NonNull context: Context,     @Nullable lifecycle: Lifecycle,     @NonNull intent: Intent,     @Nullable callback: IAttachmentLoaderCallback)

Call this method to load a file attachment presented by com.streamwide.smartms.lib.core.data.item.FileAttachment.

This method can return a file, an image or a video attachment based on mime type.

This method can be executed in a main thread since it is already done in an AsyncTask.

Parameters

context

The application context.

lifecycle

The application lifecycle.

intent

An intent that contains all necessary data to extract a file attachment.

callback

It will be invoked when the file has been successfully loaded or when an error has occurred. Other details are delivered in the IAttachmentLoaderCallback callback.