public
static
final
class
MediaStore.Audio.Media
extends Object
implements
MediaStore.Audio.AudioColumns
Summary
Inherited constants |
From interface
android.provider.MediaStore.Audio.AudioColumns
String |
ALBUM_ID
The id of the album the audio file is from, if any
This constant represents a column name that can be used with a ContentProvider through a ContentValues or Cursor object.
|
String |
ALBUM_KEY
This constant was deprecated
in API level 30.
These keys are generated using
Locale.ROOT , which means they don't
reflect locale-specific sorting preferences. To apply
locale-specific sorting preferences, use
ContentResolver#QUERY_ARG_SQL_SORT_ORDER with
COLLATE LOCALIZED , or
ContentResolver#QUERY_ARG_SORT_LOCALE .
|
String |
ARTIST_ID
The id of the artist who created the audio file, if any
This constant represents a column name that can be used with a ContentProvider through a ContentValues or Cursor object.
|
String |
ARTIST_KEY
This constant was deprecated
in API level 30.
These keys are generated using
Locale.ROOT , which means they don't
reflect locale-specific sorting preferences. To apply
locale-specific sorting preferences, use
ContentResolver#QUERY_ARG_SQL_SORT_ORDER with
COLLATE LOCALIZED , or
ContentResolver#QUERY_ARG_SORT_LOCALE .
|
String |
BOOKMARK
The position within the audio item at which playback should be
resumed.
|
String |
GENRE
The genre of the audio file, if any.
|
String |
GENRE_ID
The id of the genre the audio file is from, if any
This constant represents a column name that can be used with a ContentProvider through a ContentValues or Cursor object.
|
String |
GENRE_KEY
This constant was deprecated
in API level 30.
These keys are generated using
Locale.ROOT , which means they don't
reflect locale-specific sorting preferences. To apply
locale-specific sorting preferences, use
ContentResolver#QUERY_ARG_SQL_SORT_ORDER with
COLLATE LOCALIZED , or
ContentResolver#QUERY_ARG_SORT_LOCALE .
|
String |
IS_ALARM
Non-zero if the audio file may be an alarm
This constant represents a column name that can be used with a ContentProvider through a ContentValues or Cursor object.
|
String |
IS_AUDIOBOOK
Non-zero if the audio file is an audiobook
This constant represents a column name that can be used with a ContentProvider through a ContentValues or Cursor object.
|
String |
IS_MUSIC
Non-zero if the audio file is music
This constant represents a column name that can be used with a ContentProvider through a ContentValues or Cursor object.
|
String |
IS_NOTIFICATION
Non-zero if the audio file may be a notification sound
This constant represents a column name that can be used with a ContentProvider through a ContentValues or Cursor object.
|
String |
IS_PODCAST
Non-zero if the audio file is a podcast
This constant represents a column name that can be used with a ContentProvider through a ContentValues or Cursor object.
|
String |
IS_RECORDING
Non-zero if the audio file is a voice recording recorded
by voice recorder apps
This constant represents a column name that can be used with a ContentProvider through a ContentValues or Cursor object.
|
String |
IS_RINGTONE
Non-zero if the audio file may be a ringtone
This constant represents a column name that can be used with a ContentProvider through a ContentValues or Cursor object.
|
String |
TITLE_KEY
This constant was deprecated
in API level 30.
These keys are generated using
Locale.ROOT , which means they don't
reflect locale-specific sorting preferences. To apply
locale-specific sorting preferences, use
ContentResolver#QUERY_ARG_SQL_SORT_ORDER with
COLLATE LOCALIZED , or
ContentResolver#QUERY_ARG_SORT_LOCALE .
|
String |
TITLE_RESOURCE_URI
The resource URI of a localized title, if any.
|
String |
TRACK
The track number of this song on the album, if any.
|
String |
YEAR
The year the audio file was recorded, if any
This constant represents a column name that can be used with a ContentProvider through a ContentValues or Cursor object.
|
|
|
|
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 |
From class
java.lang.Object
Object
|
clone()
Creates and returns a copy of this object.
|
boolean
|
equals(Object obj)
Indicates whether some other object is "equal to" this one.
|
void
|
finalize()
Called by the garbage collector on an object when garbage collection
determines that there are no more references to the object.
|
final
Class<?>
|
getClass()
Returns the runtime class of this Object .
|
int
|
hashCode()
Returns a hash code value for the object.
|
final
void
|
notify()
Wakes up a single thread that is waiting on this object's
monitor.
|
final
void
|
notifyAll()
Wakes up all threads that are waiting on this object's monitor.
|
String
|
toString()
Returns a string representation of the object.
|
final
void
|
wait(long timeoutMillis, int nanos)
Causes the current thread to wait until it is awakened, typically
by being notified or interrupted, or until a
certain amount of real time has elapsed.
|
final
void
|
wait(long timeoutMillis)
Causes the current thread to wait until it is awakened, typically
by being notified or interrupted, or until a
certain amount of real time has elapsed.
|
final
void
|
wait()
Causes the current thread to wait until it is awakened, typically
by being notified or interrupted.
|
|
Constants
CONTENT_TYPE
public static final String CONTENT_TYPE
The MIME type for this table.
Constant Value:
"vnd.android.cursor.dir/audio"
DEFAULT_SORT_ORDER
public static final String DEFAULT_SORT_ORDER
The default sort order for this table
Constant Value:
"title_key"
ENTRY_CONTENT_TYPE
public static final String ENTRY_CONTENT_TYPE
The MIME type for an audio track.
Constant Value:
"vnd.android.cursor.item/audio"
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
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.
Constant Value:
"android.provider.MediaStore.RECORD_SOUND"
Fields
EXTERNAL_CONTENT_URI
public static final Uri EXTERNAL_CONTENT_URI
The content:// style URI for the "primary" external storage
volume.
INTERNAL_CONTENT_URI
public static final Uri INTERNAL_CONTENT_URI
The content:// style URI for the internal storage.
Public constructors
Public methods
getContentUri
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
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
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 . |