MediaGalleryPreviewContract
class MediaGalleryPreviewContract(config: MediaGalleryConfig = MediaGalleryConfig()) : ActivityResultContract<MediaGalleryPreviewContract.Input, MediaGalleryPreviewResult?>
The contract used to start the MediaGalleryPreviewActivity given a message ID and the position of the clicked attachment.
Parameters
config
The configuration for the media gallery.
Types
Link copied to clipboard
class Input(val message: Message, val initialPosition: Int = 0, val videoThumbnailsEnabled: Boolean, val downloadAttachmentUriGenerator: DownloadAttachmentUriGenerator, val downloadRequestInterceptor: DownloadRequestInterceptor, val streamCdnImageResizing: StreamCdnImageResizing, val skipEnrichUrl: Boolean = false)
Defines the input for the MediaGalleryPreviewContract.
Functions
Link copied to clipboard
Creates the intent to start the MediaGalleryPreviewActivity. It receives a data pair of a String and an Int that represent the messageId and the attachmentPosition.
Link copied to clipboard
open fun getSynchronousResult(context: Context, input: MediaGalleryPreviewContract.Input): ActivityResultContract.SynchronousResult<MediaGalleryPreviewResult?>?
Link copied to clipboard
We parse the result as MediaGalleryPreviewResult, which can be null in case there is no result to return.