MediaStore.Audio  |  API reference  |  Android Developers (original) (raw)


public static final class MediaStore.Audio
extends [Object](/reference/java/lang/Object) ``


Collection of all media with MIME type of audio/*.

Summary

Nested classes
interface MediaStore.Audio.AlbumColumns Audio album metadata columns.
class MediaStore.Audio.Albums Contains artists for audio files
interface MediaStore.Audio.ArtistColumns Audio artist metadata columns.
class MediaStore.Audio.Artists Contains artists for audio files
interface MediaStore.Audio.AudioColumns Audio metadata columns.
class MediaStore.Audio.Genres Contains all genres for audio files
interface MediaStore.Audio.GenresColumns Audio genre metadata columns.
class MediaStore.Audio.Media
class MediaStore.Audio.Playlists This class was deprecated in API level 31. Android playlists are now deprecated. We will keep the current functionality for compatibility resons, but we will no longer take feature request. We do not advise adding new usages of Android Playlists. M3U files can be used as an alternative.
interface MediaStore.Audio.PlaylistsColumns This interface was deprecated in API level 31. Android playlists are now deprecated. We will keep the current functionality for compatibility reasons, but we will no longer take feature request. We do not advise adding new usages of Android Playlists. M3U files can be used as an alternative.
class MediaStore.Audio.Radio
Public constructors
Audio()
Public methods
staticString keyFor(String name) This method was deprecated in API level 30. These keys are generated usingLocale.ROOT, which means they don't reflect locale-specific sorting preferences. To apply locale-specific sorting preferences, useContentResolver.QUERY_ARG_SQL_SORT_ORDER withCOLLATE LOCALIZED, orContentResolver.QUERY_ARG_SORT_LOCALE.
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. finalClass<?> 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.

Public constructors

Public methods

keyFor

public static String keyFor (String name)

This method was deprecated in API level 30.
These keys are generated using[Locale.ROOT](/reference/java/util/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](/reference/android/content/ContentResolver#QUERY%5FARG%5FSQL%5FSORT%5FORDER) withCOLLATE LOCALIZED, or[ContentResolver.QUERY_ARG_SORT_LOCALE](/reference/android/content/ContentResolver#QUERY%5FARG%5FSORT%5FLOCALE).

Converts a user-visible string into a "key" that can be used for grouping, sorting, and searching.

Parameters
name String: This value may be null.
Returns
String Opaque token that should not be parsed or displayed to users. This value may be null.

Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.

Last updated 2026-02-13 UTC.