Type identifier for contents that are transferable between applications or processes. Although mime type format was standardized, each platform is free to choose how they define media types. Therefore, this class has an expect modifier for different platforms to specify how they define certain common media types like Text, and Image.

Summary

Public companion properties

MediaType

Matches all content types.

Cmn
android
MediaType

Text that represents an HTML content.

Cmn
android
MediaType

Any type of image like PNG, JPEG, or GIFs.

Cmn
android
MediaType

Plain text that's only decoded from its raw representation, does not define or carry any annotations.

Cmn
android
MediaType

Any type of text, html, stylized, or plain.

Cmn
android

Public constructors

MediaType(representation: String)
Cmn
android

Public functions

open operator Boolean
equals(other: Any?)
android
open operator Boolean
equals(other: Any?)
android
open Int
android
open Int
android
open String
android
open String
android

Public properties

DataFlavor
android
String

How this MediaType is represented in a specific platform.

Cmn
android

Public companion properties

All

val AllMediaType

Matches all content types.

HtmlText

val HtmlTextMediaType

Text that represents an HTML content.

Image

val ImageMediaType

Any type of image like PNG, JPEG, or GIFs.

PlainText

val PlainTextMediaType

Plain text that's only decoded from its raw representation, does not define or carry any annotations.

Text

val TextMediaType

Any type of text, html, stylized, or plain.

Public constructors

MediaType

MediaType(representation: String)

Public functions

equals

open operator fun equals(other: Any?): Boolean

equals

open operator fun equals(other: Any?): Boolean

hashCode

open fun hashCode(): Int

hashCode

open fun hashCode(): Int

toString

open fun toString(): String

toString

open fun toString(): String

Public properties

dataFlavor

val dataFlavorDataFlavor

representation

val representationString

How this MediaType is represented in a specific platform.