MediaStore.Audio.Media


public static final class MediaStore.Audio.Media
extends Object implements MediaStore.Audio.AudioColumns

java.lang.Object
   ↳ android.provider.MediaStore.Audio.Media


Summary

Constants

String CONTENT_TYPE

The MIME type for this table.

String DEFAULT_SORT_ORDER

The default sort order for this table

String ENTRY_CONTENT_TYPE

The MIME type for an audio track.

String EXTRA_MAX_BYTES

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

String RECORD_SOUND_ACTION

Activity Action: Start SoundRecorder application.

Inherited constants

Fields

public static final Uri EXTERNAL_CONTENT_URI

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

public static final Uri INTERNAL_CONTENT_URI

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

Public constructors

Media()

Public methods

static Uri getContentUri(String volumeName)

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

static Uri getContentUri(String volumeName, long id)

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

static Uri getContentUriForPath(String path)

This method was deprecated in API level 29. Apps may not have filesystem permissions to directly access this path.

Inherited methods

Constants

CONTENT_TYPE

Added in API level 1
public static final String CONTENT_TYPE

The MIME type for this table.

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

DEFAULT_SORT_ORDER

Added in API level 1
public static final String DEFAULT_SORT_ORDER

The default sort order for this table

Constant Value: "title_key"

ENTRY_CONTENT_TYPE

Added in API level 21
public static final String ENTRY_CONTENT_TYPE

The MIME type for an audio track.

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

EXTRA_MAX_BYTES

Added in API level 3
public static final String EXTRA_MAX_BYTES

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

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

RECORD_SOUND_ACTION

Added in API level 1
public static final String RECORD_SOUND_ACTION

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.

See also:

Constant Value: "android.provider.MediaStore.RECORD_SOUND"

Fields

EXTERNAL_CONTENT_URI

Added in API level 1
public static final Uri EXTERNAL_CONTENT_URI

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

INTERNAL_CONTENT_URI

Added in API level 1
public static final Uri INTERNAL_CONTENT_URI

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

Public constructors

Media

Added in API level 1
public Media ()

Public methods

getContentUri

Added in API level 1
public static Uri getContentUri (String volumeName)

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

Returns
Uri the URI to the audio media table on the given volume

getContentUri

Added in API level 30
public static Uri getContentUri (String volumeName, 
                long id)

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

Returns
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
public static Uri getContentUriForPath (String path)

This method was deprecated in API level 29.
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.

Returns
Uri This value may be null.