MediaItem

sealed class MediaItem : Parcelable

A sealed class which encapsulates the media items. This includes media items that are stored locally (MediaItem.Local) as well as media items which are not loaded yet, but their thumbnail is available (MediaItem.Thumbnail).

Use SOCommMediaClient.getMediaItemSource to get a MediaItemSource which can be used to get the data (InputStream / Bitmap) for a given MediaItem or its thumbnail. It is encouraged to use the MediaItemSource when accessing the content / thumbnail of a MediaItem, as caching is involved when accessing the item using the MediaItemSource as defined in the SOCommMediaClientBuilder.thumbnailCache.

Inheritors

Types

Link copied to clipboard
data class Local(val fileName: String, val mediaType: MediaType, val uri: Uri, val dateTime: LocalDateTime?) : MediaItem

A class which represents the data for a locally stored media item.

Link copied to clipboard
data class Thumbnail(val fileName: String, val mediaType: MediaType, val thumbnail: ByteArray, val dateTime: LocalDateTime?) : MediaItem

A class which represents the thumbnail for a new picture created on the remote device.

Properties

Link copied to clipboard
abstract val dateTime: LocalDateTime?

The dateTime of the given MediaItem of when it was recorded.

Link copied to clipboard
abstract val fileName: String

The fileName of this media item

Link copied to clipboard
abstract val mediaType: MediaType

Whether the given MediaItem is a Picture or Video.

Functions

Link copied to clipboard
abstract fun describeContents(): Int
Link copied to clipboard
open operator override fun equals(other: Any?): Boolean
Link copied to clipboard
open override fun hashCode(): Int
Link copied to clipboard
abstract fun writeToParcel(p0: Parcel, p1: Int)