# CloudMediaProviderContract.MediaCategoryColumns

Added in[API level 36](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)  
Also in[R Extensions 16](https://developer.android.com/sdkExtensions)

# MediaCategoryColumns

*** ** * ** ***

Kotlin\|[Java](https://developer.android.com/reference/android/provider/CloudMediaProviderContract.MediaCategoryColumns "View this page in Java")  

```
class MediaCategoryColumns
```

|---|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [kotlin.Any](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html)                                                                                                       ||
| ↳ | [android.provider.CloudMediaProviderContract.MediaCategoryColumns](https://developer.android.com/reference/kotlin/android/provider/CloudMediaProviderContract.MediaCategoryColumns#) |

MediaCategory represents a broader structure that a[MediaSetColumns](https://developer.android.com/reference/kotlin/android/provider/CloudMediaProviderContract.MediaSetColumns)or another[MediaCategoryColumns](https://developer.android.com/reference/kotlin/android/provider/CloudMediaProviderContract.MediaCategoryColumns#)belongs to. A MediaCategory in this context is represented by a set of columns present in[MediaCategoryColumns](https://developer.android.com/reference/kotlin/android/provider/CloudMediaProviderContract.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

<!-- -->

- [MEDIA_CATEGORY_TYPE_PEOPLE_AND_PETS](https://developer.android.com/reference/kotlin/android/provider/CloudMediaProviderContract#MEDIA_CATEGORY_TYPE_PEOPLE_AND_PETS:kotlin.String)
- [MEDIA_CATEGORY_TYPE_USER_ALBUMS](https://developer.android.com/reference/kotlin/android/provider/CloudMediaProviderContract#MEDIA_CATEGORY_TYPE_USER_ALBUMS:kotlin.String)

These are the fields of MediaCategory.

<br />

## Summary

|                                                                                                                                             Constants                                                                                                                                              ||
|----------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| static[String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) | [DISPLAY_NAME](https://developer.android.com/reference/kotlin/android/provider/CloudMediaProviderContract.MediaCategoryColumns#DISPLAY_NAME:kotlin.String) The display name of the media category.         |
| static[String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) | [ID](https://developer.android.com/reference/kotlin/android/provider/CloudMediaProviderContract.MediaCategoryColumns#ID:kotlin.String) The unique identifier of the media category.                        |
| static[String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) | [MEDIA_CATEGORY_TYPE](https://developer.android.com/reference/kotlin/android/provider/CloudMediaProviderContract.MediaCategoryColumns#MEDIA_CATEGORY_TYPE:kotlin.String) The type of the media category.   |
| static[String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) | [MEDIA_COVER_ID1](https://developer.android.com/reference/kotlin/android/provider/CloudMediaProviderContract.MediaCategoryColumns#MEDIA_COVER_ID1:kotlin.String) The first cover media ID for displaying.  |
| static[String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) | [MEDIA_COVER_ID2](https://developer.android.com/reference/kotlin/android/provider/CloudMediaProviderContract.MediaCategoryColumns#MEDIA_COVER_ID2:kotlin.String) The second cover media ID for displaying. |
| static[String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) | [MEDIA_COVER_ID3](https://developer.android.com/reference/kotlin/android/provider/CloudMediaProviderContract.MediaCategoryColumns#MEDIA_COVER_ID3:kotlin.String) The third cover media ID for displaying.  |
| static[String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) | [MEDIA_COVER_ID4](https://developer.android.com/reference/kotlin/android/provider/CloudMediaProviderContract.MediaCategoryColumns#MEDIA_COVER_ID4:kotlin.String) The fourth cover media ID for displaying. |

## Constants

### DISPLAY_NAME

Added in[API level 36](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)  
Also in[R Extensions 16](https://developer.android.com/sdkExtensions)  

```
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

Added in[API level 36](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)  
Also in[R Extensions 16](https://developer.android.com/sdkExtensions)  

```
static val ID: String
```

The unique identifier of the media category. This ID is both provided by and interpreted by the[CloudMediaProvider](https://developer.android.com/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  

    Value: "id"

### MEDIA_CATEGORY_TYPE

Added in[API level 36](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)  
Also in[R Extensions 16](https://developer.android.com/sdkExtensions)  

```
static val MEDIA_CATEGORY_TYPE: String
```

The 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](https://developer.android.com/reference/kotlin/android/provider/CloudMediaProviderContract#MEDIA_CATEGORY_TYPE_PEOPLE_AND_PETS:kotlin.String)[MEDIA_CATEGORY_TYPE_USER_ALBUMS](https://developer.android.com/reference/kotlin/android/provider/CloudMediaProviderContract#MEDIA_CATEGORY_TYPE_USER_ALBUMS:kotlin.String)Type: INTEGER  

    Value: "media_category_type"

### MEDIA_COVER_ID1

Added in[API level 36](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)  
Also in[R Extensions 16](https://developer.android.com/sdkExtensions)  

```
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"

### MEDIA_COVER_ID2

Added in[API level 36](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)  
Also in[R Extensions 16](https://developer.android.com/sdkExtensions)  

```
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"

### MEDIA_COVER_ID3

Added in[API level 36](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)  
Also in[R Extensions 16](https://developer.android.com/sdkExtensions)  

```
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"

### MEDIA_COVER_ID4

Added in[API level 36](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)  
Also in[R Extensions 16](https://developer.android.com/sdkExtensions)  

```
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"