Stay organized with collections
Save and categorize content based on your preferences.
class MediaSetColumns
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
Constants |
static String |
Display name of the media set.
|
static String |
Unique ID of the media set.
|
static String |
Total count of all media within the media set, including photos and videos.
|
static String |
Media ID to use as the media set cover photo.
|
Constants
DISPLAY_NAME
static val DISPLAY_NAME: String
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
Value: "display_name"
ID
static val ID: String
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
Value: "id"
static val MEDIA_COUNT: String
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
Value: "media_count"
static val MEDIA_COVER_ID: String
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
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.
[null,null,["Last updated 2025-08-20 UTC."],[],[],null,["# CloudMediaProviderContract.MediaSetColumns\n\nAdded in [API level 36](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \nAlso in [R Extensions 16](https://developer.android.com/sdkExtensions)\n\nMediaSetColumns\n===============\n\n*** ** * ** ***\n\nKotlin \\|[Java](/reference/android/provider/CloudMediaProviderContract.MediaSetColumns \"View this page in Java\") \n\n```\nclass MediaSetColumns\n```\n\n|---|------------------------------------------------------------------|\n| [kotlin.Any](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html) ||\n| ↳ | [android.provider.CloudMediaProviderContract.MediaSetColumns](#) |\n\nMediaSet 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:\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/kotlin/android/provider/CloudMediaProviderContract.AlbumColumns) which denotes an album can also be represented using [MediaSetColumns](#). But, it is recommended to keep using [AlbumColumns](/reference/kotlin/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- [MEDIA_CATEGORY_TYPE_PEOPLE_AND_PETS](/reference/kotlin/android/provider/CloudMediaProviderContract#MEDIA_CATEGORY_TYPE_PEOPLE_AND_PETS:kotlin.String)\n- [MEDIA_CATEGORY_TYPE_USER_ALBUMS](/reference/kotlin/android/provider/CloudMediaProviderContract#MEDIA_CATEGORY_TYPE_USER_ALBUMS:kotlin.String)\n\nThese are the fields of a MediaSet.\n\n\u003cbr /\u003e\n\nSummary\n-------\n\n| Constants ||\n|-----------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------|\n| static [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) | [DISPLAY_NAME](#DISPLAY_NAME:kotlin.String) Display name of the media set. |\n| static [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) | [ID](#ID:kotlin.String) Unique ID of the media set. |\n| static [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) | [MEDIA_COUNT](#MEDIA_COUNT:kotlin.String) Total count of all media within the media set, including photos and videos. |\n| static [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) | [MEDIA_COVER_ID](#MEDIA_COVER_ID:kotlin.String) Media ID to use as the media set cover photo. |\n\nConstants\n---------\n\n### DISPLAY_NAME\n\nAdded in [API level 36](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \nAlso in [R Extensions 16](https://developer.android.com/sdkExtensions) \n\n```\nstatic val DISPLAY_NAME: String\n```\n\nDisplay 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 \n\n Value: \"display_name\"\n\n### ID\n\nAdded in [API level 36](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \nAlso in [R Extensions 16](https://developer.android.com/sdkExtensions) \n\n```\nstatic val ID: String\n```\n\nUnique ID of the media set. This ID is both provided by and interpreted by the [CloudMediaProvider](/reference/kotlin/android/provider/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 \n\n Value: \"id\"\n\n### MEDIA_COUNT\n\nAdded in [API level 36](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \nAlso in [R Extensions 16](https://developer.android.com/sdkExtensions) \n\n```\nstatic val MEDIA_COUNT: String\n```\n\nTotal 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 \n\n Value: \"media_count\"\n\n### MEDIA_COVER_ID\n\nAdded in [API level 36](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \nAlso in [R Extensions 16](https://developer.android.com/sdkExtensions) \n\n```\nstatic val MEDIA_COVER_ID: String\n```\n\nMedia 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 \n\n Value: \"media_cover_id\"\n\n**See Also**\n\n- [android.provider.CloudMediaProviderContract.MediaColumns#ID](/reference/kotlin/android/provider/CloudMediaProviderContract.MediaColumns#ID:kotlin.String)"]]