Stay organized with collections
Save and categorize content based on your preferences.
class MediaCategoryColumns
MediaCategory represents a broader structure that a MediaSetColumns
or another MediaCategoryColumns
belongs to. A MediaCategory in this context is represented by a set of columns present in MediaCategoryColumns
A MediaCategory can have instances of other MediaCategories to support a multilevel hierarchy. Examples of MediaCategory:
- A MediaCategory of people and pet faces which contains instances of MediaSets for different faces
- A MediaCategory of locations which contains instances of MediaSets for different locations
The currently supported MediaCategory in photo picker are
These are the fields of MediaCategory.
Summary
Constants |
static String |
The display name of the media category.
|
static String |
The unique identifier of the media category.
|
static String |
The type of the media category.
|
static String |
The first cover media ID for displaying.
|
static String |
The second cover media ID for displaying.
|
static String |
The third cover media ID for displaying.
|
static String |
The fourth cover media ID for displaying.
|
Constants
DISPLAY_NAME
static val DISPLAY_NAME: String
The display name of the media category. 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
The unique identifier of the media category. This ID is both provided by and interpreted by the CloudMediaProvider
. 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 information in the OS. Type: STRING
Value: "id"
static val MEDIA_COVER_ID1: String
The first cover media ID for displaying.
If none of the MEDIA_COVER_ID is provided, media category will be shown in the Photo Picker with a default icon. Otherwise, Photo Picker will show as many MEDIA_COVER_IDs as provided.
Type: STRING
Value: "media_cover_id1"
static val MEDIA_COVER_ID2: String
The second cover media ID for displaying.
If none of the MEDIA_COVER_ID is provided, media category will be shown in the Photo Picker with a default icon. Otherwise, Photo Picker will show as many MEDIA_COVER_IDs as provided.
Type: STRING
Value: "media_cover_id2"
static val MEDIA_COVER_ID3: String
The third cover media ID for displaying.
If none of the MEDIA_COVER_ID is provided, media category will be shown in the Photo Picker with a default icon. Otherwise, Photo Picker will show as many MEDIA_COVER_IDs as provided.
Type: STRING
Value: "media_cover_id3"
static val MEDIA_COVER_ID4: String
The fourth cover media ID for displaying.
If none of the MEDIA_COVER_ID is provided, media category will be shown in the Photo Picker with a default icon. Otherwise, Photo Picker will show as many MEDIA_COVER_IDs as provided.
Type: STRING
Value: "media_cover_id4"
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.MediaCategoryColumns\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\nMediaCategoryColumns\n====================\n\n*** ** * ** ***\n\nKotlin \\|[Java](/reference/android/provider/CloudMediaProviderContract.MediaCategoryColumns \"View this page in Java\") \n\n```\nclass MediaCategoryColumns\n```\n\n|---|-----------------------------------------------------------------------|\n| [kotlin.Any](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html) ||\n| ↳ | [android.provider.CloudMediaProviderContract.MediaCategoryColumns](#) |\n\nMediaCategory represents a broader structure that a [MediaSetColumns](/reference/kotlin/android/provider/CloudMediaProviderContract.MediaSetColumns) or another [MediaCategoryColumns](#) belongs to. A MediaCategory in this context is represented by a set of columns present in [MediaCategoryColumns](#) A MediaCategory can have instances of other MediaCategories to support a multilevel hierarchy. Examples of MediaCategory:\n\n- A MediaCategory of people and pet faces which contains instances of MediaSets for different faces\n- A MediaCategory of locations which contains instances of MediaSets for different locations\n\nThe currently supported MediaCategory in photo picker are\n\n\u003c!-- --\u003e\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 MediaCategory.\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) The display name of the media category. |\n| static [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) | [ID](#ID:kotlin.String) The unique identifier of the media category. |\n| static [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) | [MEDIA_CATEGORY_TYPE](#MEDIA_CATEGORY_TYPE:kotlin.String) The type of the media category. |\n| static [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) | [MEDIA_COVER_ID1](#MEDIA_COVER_ID1:kotlin.String) The first cover media ID for displaying. |\n| static [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) | [MEDIA_COVER_ID2](#MEDIA_COVER_ID2:kotlin.String) The second cover media ID for displaying. |\n| static [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) | [MEDIA_COVER_ID3](#MEDIA_COVER_ID3:kotlin.String) The third cover media ID for displaying. |\n| static [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) | [MEDIA_COVER_ID4](#MEDIA_COVER_ID4:kotlin.String) The fourth cover media ID for displaying. |\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\nThe display name of the media category. 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\nThe unique identifier of the media category. This ID is both provided by and interpreted by the [CloudMediaProvider](/reference/kotlin/android/provider/CloudMediaProvider). 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 information in the OS. Type: STRING \n\n Value: \"id\"\n\n### MEDIA_CATEGORY_TYPE\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_CATEGORY_TYPE: String\n```\n\nThe type of the media category. This must contain one of the values from the supported media category types. Currently supported types are: [MEDIA_CATEGORY_TYPE_PEOPLE_AND_PETS](/reference/kotlin/android/provider/CloudMediaProviderContract#MEDIA_CATEGORY_TYPE_PEOPLE_AND_PETS:kotlin.String) [MEDIA_CATEGORY_TYPE_USER_ALBUMS](/reference/kotlin/android/provider/CloudMediaProviderContract#MEDIA_CATEGORY_TYPE_USER_ALBUMS:kotlin.String) Type: INTEGER \n\n Value: \"media_category_type\"\n\n### MEDIA_COVER_ID1\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_ID1: String\n```\n\nThe first cover media ID for displaying.\n\nIf none of the MEDIA_COVER_ID is provided, media category will be shown in the Photo Picker with a default icon. Otherwise, Photo Picker will show as many MEDIA_COVER_IDs as provided.\n\nType: STRING \n\n Value: \"media_cover_id1\"\n\n### MEDIA_COVER_ID2\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_ID2: String\n```\n\nThe second cover media ID for displaying.\n\nIf none of the MEDIA_COVER_ID is provided, media category will be shown in the Photo Picker with a default icon. Otherwise, Photo Picker will show as many MEDIA_COVER_IDs as provided.\n\nType: STRING \n\n Value: \"media_cover_id2\"\n\n### MEDIA_COVER_ID3\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_ID3: String\n```\n\nThe third cover media ID for displaying.\n\nIf none of the MEDIA_COVER_ID is provided, media category will be shown in the Photo Picker with a default icon. Otherwise, Photo Picker will show as many MEDIA_COVER_IDs as provided.\n\nType: STRING \n\n Value: \"media_cover_id3\"\n\n### MEDIA_COVER_ID4\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_ID4: String\n```\n\nThe fourth cover media ID for displaying.\n\nIf none of the MEDIA_COVER_ID is provided, media category will be shown in the Photo Picker with a default icon. Otherwise, Photo Picker will show as many MEDIA_COVER_IDs as provided.\n\nType: STRING \n\n Value: \"media_cover_id4\""]]