Added in [API level 36](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  
Also in [R Extensions 16](https://developer.android.com/sdkExtensions) Summary: [Constants](https://developer.android.com/reference/android/provider/CloudMediaProviderContract.MediaCategoryColumns#constants) \| [Inherited Methods](https://developer.android.com/reference/android/provider/CloudMediaProviderContract.MediaCategoryColumns#inhmethods)

# CloudMediaProviderContract.MediaCategoryColumns

*** ** * ** ***


`
public
static
final

class
CloudMediaProviderContract.MediaCategoryColumns
`


`

extends https://developer.android.com/reference/java/lang/Object


`

`


`

|---|---|
| [java.lang.Object](https://developer.android.com/reference/java/lang/Object) ||
| ↳ | android.provider.CloudMediaProviderContract.MediaCategoryColumns |

<br />

*** ** * ** ***

MediaCategory represents a broader structure
that a `https://developer.android.com/reference/android/provider/CloudMediaProviderContract.MediaSetColumns` or another `https://developer.android.com/reference/android/provider/CloudMediaProviderContract.MediaCategoryColumns` belongs to.

A MediaCategory in this context is represented by a set of columns present in
`https://developer.android.com/reference/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

<!-- -->

- `https://developer.android.com/reference/android/provider/CloudMediaProviderContract#MEDIA_CATEGORY_TYPE_PEOPLE_AND_PETS`
- `https://developer.android.com/reference/android/provider/CloudMediaProviderContract#MEDIA_CATEGORY_TYPE_USER_ALBUMS`

These are the fields of MediaCategory.

<br />

**See also:**

- `https://developer.android.com/reference/android/provider/CloudMediaProvider#onQueryMediaCategories(java.lang.String,%20android.os.Bundle,%20android.os.CancellationSignal)`

## Summary

| ### Constants ||
|---|---|
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/provider/CloudMediaProviderContract.MediaCategoryColumns#DISPLAY_NAME` The display name of the media category. |
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/provider/CloudMediaProviderContract.MediaCategoryColumns#ID` The unique identifier of the media category. |
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/provider/CloudMediaProviderContract.MediaCategoryColumns#MEDIA_CATEGORY_TYPE` The type of the media category. |
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/provider/CloudMediaProviderContract.MediaCategoryColumns#MEDIA_COVER_ID1` The first cover media ID for displaying. |
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/provider/CloudMediaProviderContract.MediaCategoryColumns#MEDIA_COVER_ID2` The second cover media ID for displaying. |
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/provider/CloudMediaProviderContract.MediaCategoryColumns#MEDIA_COVER_ID3` The third cover media ID for displaying. |
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/provider/CloudMediaProviderContract.MediaCategoryColumns#MEDIA_COVER_ID4` The fourth cover media ID for displaying. |

| ### Inherited methods |
|---|---|
| From class ` https://developer.android.com/reference/java/lang/Object ` |---|---| | ` https://developer.android.com/reference/java/lang/Object` | ` https://developer.android.com/reference/java/lang/Object#clone()() ` Creates and returns a copy of this object. | | ` boolean` | ` https://developer.android.com/reference/java/lang/Object#equals(java.lang.Object)(https://developer.android.com/reference/java/lang/Object obj) ` Indicates whether some other object is "equal to" this one. | | ` void` | ` https://developer.android.com/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 https://developer.android.com/reference/java/lang/Class<?>` | ` https://developer.android.com/reference/java/lang/Object#getClass()() ` Returns the runtime class of this `Object`. | | ` int` | ` https://developer.android.com/reference/java/lang/Object#hashCode()() ` Returns a hash code value for the object. | | ` final void` | ` https://developer.android.com/reference/java/lang/Object#notify()() ` Wakes up a single thread that is waiting on this object's monitor. | | ` final void` | ` https://developer.android.com/reference/java/lang/Object#notifyAll()() ` Wakes up all threads that are waiting on this object's monitor. | | ` https://developer.android.com/reference/java/lang/String` | ` https://developer.android.com/reference/java/lang/Object#toString()() ` Returns a string representation of the object. | | ` final void` | ` https://developer.android.com/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` | ` https://developer.android.com/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` | ` https://developer.android.com/reference/java/lang/Object#wait()() ` Causes the current thread to wait until it is awakened, typically by being *notified* or *interrupted*. | ||

## Constants

### DISPLAY_NAME

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

```
public static final String DISPLAY_NAME
```

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

<br />

Constant Value:

"display_name"


### ID

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

```
public static final String ID
```

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

<br />

Constant Value:

"id"


### MEDIA_CATEGORY_TYPE

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

```
public static final String MEDIA_CATEGORY_TYPE
```

The type of the media category.
This must contain one of the values from the supported media category types.
Currently supported types are:
`https://developer.android.com/reference/android/provider/CloudMediaProviderContract#MEDIA_CATEGORY_TYPE_PEOPLE_AND_PETS`
`https://developer.android.com/reference/android/provider/CloudMediaProviderContract#MEDIA_CATEGORY_TYPE_USER_ALBUMS`

Type: INTEGER

<br />

Constant Value:

"media_category_type"


### MEDIA_COVER_ID1

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

```
public static final String MEDIA_COVER_ID1
```

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

<br />

Constant Value:

"media_cover_id1"


### MEDIA_COVER_ID2

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

```
public static final String MEDIA_COVER_ID2
```

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

<br />

Constant Value:

"media_cover_id2"


### MEDIA_COVER_ID3

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

```
public static final String MEDIA_COVER_ID3
```

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

<br />

Constant Value:

"media_cover_id3"


### MEDIA_COVER_ID4

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

```
public static final String MEDIA_COVER_ID4
```

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

<br />

Constant Value:

"media_cover_id4"