Added in API level 1

Media


class Media : MediaStore.Audio.AudioColumns
kotlin.Any
   ↳ android.provider.MediaStore.Audio.Media

Summary

Constants
static String

The MIME type for this table.

static String

The default sort order for this table

static String

The MIME type for an audio track.

static String

The name of the Intent-extra used to define a maximum file size for a recording made by the SoundRecorder application.

static String

Activity Action: Start SoundRecorder application.

Inherited constants
Public constructors

Public methods
static Uri!
getContentUri(volumeName: String!)

Get the content:// style URI for the audio media table on the given volume.

static Uri
getContentUri(volumeName: String, id: Long)

Get the content:// style URI for a single row in the audio table on the given volume.

static Uri?

Get the content:// style URI for the given audio media file.

Properties
static Uri!

The content:// style URI for the "primary" external storage volume.

static Uri!

The content:// style URI for the internal storage.

Constants

CONTENT_TYPE

Added in API level 1
static val CONTENT_TYPE: String

The MIME type for this table.

Value: "vnd.android.cursor.dir/audio"

DEFAULT_SORT_ORDER

Added in API level 1
static val DEFAULT_SORT_ORDER: String

The default sort order for this table

Value: "title_key"

ENTRY_CONTENT_TYPE

Added in API level 21
static val ENTRY_CONTENT_TYPE: String

The MIME type for an audio track.

Value: "vnd.android.cursor.item/audio"

EXTRA_MAX_BYTES

Added in API level 3
static val EXTRA_MAX_BYTES: String

The name of the Intent-extra used to define a maximum file size for a recording made by the SoundRecorder application.

Value: "android.provider.MediaStore.extra.MAX_BYTES"

RECORD_SOUND_ACTION

Added in API level 1
static val RECORD_SOUND_ACTION: String

Activity Action: Start SoundRecorder application.

Input: nothing.

Output: An uri to the recorded sound stored in the Media Library if the recording was successful. May also contain the extra EXTRA_MAX_BYTES.

Value: "android.provider.MediaStore.RECORD_SOUND"

See Also

Public constructors

Media

Added in API level 1
Media()

Public methods

getContentUri

Added in API level 1
static fun getContentUri(volumeName: String!): Uri!

Get the content:// style URI for the audio media table on the given volume.

Parameters
volumeName String!: the name of the volume to get the URI for
Return
Uri! the URI to the audio media table on the given volume

getContentUri

Added in API level 30
static fun getContentUri(
    volumeName: String,
    id: Long
): Uri

Get the content:// style URI for a single row in the audio table on the given volume.

Parameters
volumeName String: the name of the volume to get the URI for This value cannot be null.
id Long: the audio to get the URI for
Return
Uri the URI to the audio table on the given volume This value cannot be null.

getContentUriForPath

Added in API level 1
Deprecated in API level 29
static fun getContentUriForPath(path: String): Uri?

Deprecated: Apps may not have filesystem permissions to directly access this path.

Get the content:// style URI for the given audio media file.

Parameters
path String: This value cannot be null.
Return
Uri? This value may be null.

Properties

EXTERNAL_CONTENT_URI

Added in API level 1
static val EXTERNAL_CONTENT_URI: Uri!

The content:// style URI for the "primary" external storage volume.

INTERNAL_CONTENT_URI

Added in API level 1
static val INTERNAL_CONTENT_URI: Uri!

The content:// style URI for the internal storage.