Stay organized with collections
Save and categorize content based on your preferences.
public
static
final
class
CloudMediaProviderContract.MediaSetColumns
extends Object
MediaSet represents a cohesive collection of related unique media items,
sharing a common meaningful context or theme.
This is the basic and fundamental unit for organizing related media items.
MediaSet in this context is represented
by a set of columns present in MediaSetColumns
Examples of media sets include:
- Faces of the same person
- Photos of a specific location
- All media as a search result to mountains
Note:
AlbumColumns
which denotes an album can also be represented
using
MediaSetColumns
. But, it is recommended to keep using
AlbumColumns
for existing user albums and use MediaSet only for supported MediaCategories .
The currently supported MediaCategory in photo picker are
These are the fields of a MediaSet.
Summary
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
DISPLAY_NAME
public static final String DISPLAY_NAME
Display name of the media set.
This display name provided should match the current devices locale settings.
If there is no display name, pass null
in this column.
Type: STRING
Constant Value:
"display_name"
ID
public static final String ID
Unique ID of the media set. This ID is both provided by and interpreted
by the CloudMediaProvider
.
Each media set must have a unique ID.
A provider should return IDs which are stable,
meaning it remains the same if nothing inside it changes,
since they will be used to cache media set information in the OS.
Type: STRING
Constant Value:
"id"
public static final String MEDIA_COUNT
Total count of all media within the media set, including photos and videos.
If this field is not provided,
media sets will be shown without a count in the Photo Picker.
Type: LONG
Constant Value:
"media_count"
public static final String MEDIA_COVER_ID
Media ID to use as the media set cover photo.
If this field is not provided,
media sets will be shown in the Photo Picker with a default icon.
Type: STRING
Constant Value:
"media_cover_id"
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 2025-08-20 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-20 UTC."],[],[],null,["# CloudMediaProviderContract.MediaSetColumns\n\nAdded in [API level 36](/guide/topics/manifest/uses-sdk-element#ApiLevels) \nAlso in [R Extensions 16](/sdkExtensions) \nSummary: [Constants](#constants) \\| [Inherited Methods](#inhmethods) \n\nCloudMediaProviderContract.MediaSetColumns\n==========================================\n\n*** ** * ** ***\n\n[Kotlin](/reference/kotlin/android/provider/CloudMediaProviderContract.MediaSetColumns \"View this page in Kotlin\") \\|Java\n\n\n`\npublic\nstatic\nfinal\n\nclass\nCloudMediaProviderContract.MediaSetColumns\n`\n\n\n`\n\nextends `[Object](/reference/java/lang/Object)`\n\n\n`\n\n`\n\n\n`\n\n|---|-------------------------------------------------------------|\n| [java.lang.Object](/reference/java/lang/Object) ||\n| ↳ | android.provider.CloudMediaProviderContract.MediaSetColumns |\n\n\u003cbr /\u003e\n\n*** ** * ** ***\n\nMediaSet represents a cohesive collection of related unique media items,\nsharing a common meaningful context or theme.\nThis is the basic and fundamental unit for organizing related media items.\n\nMediaSet in this context is represented\nby a set of columns present in [MediaSetColumns](/reference/android/provider/CloudMediaProviderContract.MediaSetColumns)\n\nExamples of media sets include:\n\n- Faces of the same person\n- Photos of a specific location\n- All media as a search result to mountains\n\nNote: [AlbumColumns](/reference/android/provider/CloudMediaProviderContract.AlbumColumns) which denotes an album can also be represented using [MediaSetColumns](/reference/android/provider/CloudMediaProviderContract.MediaSetColumns). But, it is recommended to keep using [AlbumColumns](/reference/android/provider/CloudMediaProviderContract.AlbumColumns) for existing user albums and use MediaSet only for supported MediaCategories . The currently supported MediaCategory in photo picker are\n\n- [CloudMediaProviderContract.MEDIA_CATEGORY_TYPE_PEOPLE_AND_PETS](/reference/android/provider/CloudMediaProviderContract#MEDIA_CATEGORY_TYPE_PEOPLE_AND_PETS)\n- [CloudMediaProviderContract.MEDIA_CATEGORY_TYPE_USER_ALBUMS](/reference/android/provider/CloudMediaProviderContract#MEDIA_CATEGORY_TYPE_USER_ALBUMS)\n\nThese are the fields of a MediaSet.\n\n\u003cbr /\u003e\n\n**See also:**\n\n- [CloudMediaProviderContract.MediaCategoryColumns](/reference/android/provider/CloudMediaProviderContract.MediaCategoryColumns)\n\nSummary\n-------\n\n| ### Constants ||\n|---------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| [String](/reference/java/lang/String) | [DISPLAY_NAME](/reference/android/provider/CloudMediaProviderContract.MediaSetColumns#DISPLAY_NAME) Display name of the media set. |\n| [String](/reference/java/lang/String) | [ID](/reference/android/provider/CloudMediaProviderContract.MediaSetColumns#ID) Unique ID of the media set. |\n| [String](/reference/java/lang/String) | [MEDIA_COUNT](/reference/android/provider/CloudMediaProviderContract.MediaSetColumns#MEDIA_COUNT) Total count of all media within the media set, including photos and videos. |\n| [String](/reference/java/lang/String) | [MEDIA_COVER_ID](/reference/android/provider/CloudMediaProviderContract.MediaSetColumns#MEDIA_COVER_ID) Media ID to use as the media set cover photo. |\n\n| ### Inherited methods |\n|-----------------------|---|\n| From class ` `[java.lang.Object](/reference/java/lang/Object)` ` |---------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | ` `[Object](/reference/java/lang/Object) | ` `[clone](/reference/java/lang/Object#clone())`() ` Creates and returns a copy of this object. | | ` boolean` | ` `[equals](/reference/java/lang/Object#equals(java.lang.Object))`(`[Object](/reference/java/lang/Object)` obj) ` Indicates whether some other object is \"equal to\" this one. | | ` void` | ` `[finalize](/reference/java/lang/Object#finalize())`() ` Called by the garbage collector on an object when garbage collection determines that there are no more references to the object. | | ` final `[Class](/reference/java/lang/Class)`\u003c?\u003e` | ` `[getClass](/reference/java/lang/Object#getClass())`() ` Returns the runtime class of this `Object`. | | ` int` | ` `[hashCode](/reference/java/lang/Object#hashCode())`() ` Returns a hash code value for the object. | | ` final void` | ` `[notify](/reference/java/lang/Object#notify())`() ` Wakes up a single thread that is waiting on this object's monitor. | | ` final void` | ` `[notifyAll](/reference/java/lang/Object#notifyAll())`() ` Wakes up all threads that are waiting on this object's monitor. | | ` `[String](/reference/java/lang/String) | ` `[toString](/reference/java/lang/Object#toString())`() ` Returns a string representation of the object. | | ` final void` | ` `[wait](/reference/java/lang/Object#wait(long,%20int))`(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](/reference/java/lang/Object#wait(long))`(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](/reference/java/lang/Object#wait())`() ` Causes the current thread to wait until it is awakened, typically by being *notified* or *interrupted*. | ||\n\nConstants\n---------\n\n### DISPLAY_NAME\n\nAdded in [API level 36](/guide/topics/manifest/uses-sdk-element#ApiLevels) \nAlso in [R Extensions 16](/sdkExtensions) \n\n```\npublic static final String DISPLAY_NAME\n```\n\nDisplay name of the media set.\nThis display name provided should match the current devices locale settings.\nIf there is no display name, pass `null` in this column.\n\nType: STRING\n\n\u003cbr /\u003e\n\nConstant Value:\n\n\"display_name\"\n\n\n### ID\n\nAdded in [API level 36](/guide/topics/manifest/uses-sdk-element#ApiLevels) \nAlso in [R Extensions 16](/sdkExtensions) \n\n```\npublic static final String ID\n```\n\nUnique ID of the media set. This ID is both provided by and interpreted\nby the [CloudMediaProvider](/reference/android/provider/CloudMediaProvider).\n\nEach media set must have a unique ID.\n\nA provider should return IDs which are stable,\nmeaning it remains the same if nothing inside it changes,\nsince they will be used to cache media set information in the OS.\n\nType: STRING\n\n\u003cbr /\u003e\n\nConstant Value:\n\n\"id\"\n\n\n### MEDIA_COUNT\n\nAdded in [API level 36](/guide/topics/manifest/uses-sdk-element#ApiLevels) \nAlso in [R Extensions 16](/sdkExtensions) \n\n```\npublic static final String MEDIA_COUNT\n```\n\nTotal count of all media within the media set, including photos and videos.\n\nIf this field is not provided,\nmedia sets will be shown without a count in the Photo Picker.\n\nType: LONG\n\n\u003cbr /\u003e\n\nConstant Value:\n\n\"media_count\"\n\n\n### MEDIA_COVER_ID\n\nAdded in [API level 36](/guide/topics/manifest/uses-sdk-element#ApiLevels) \nAlso in [R Extensions 16](/sdkExtensions) \n\n```\npublic static final String MEDIA_COVER_ID\n```\n\nMedia ID to use as the media set cover photo.\n\nIf this field is not provided,\nmedia sets will be shown in the Photo Picker with a default icon.\n\nType: STRING\n\n\u003cbr /\u003e\n\n**See also:**\n\n- [CloudMediaProviderContract.MediaColumns.ID](/reference/android/provider/CloudMediaProviderContract.MediaColumns#ID)\n\nConstant Value:\n\n\"media_cover_id\""]]