# CloudMediaProviderContract.MediaCollectionInfo

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

# CloudMediaProviderContract.MediaCollectionInfo

*** ** * ** ***

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

`
public
static
final

class
CloudMediaProviderContract.MediaCollectionInfo
`  
`

extends `[Object](https://developer.android.com/reference/java/lang/Object)`


``


`

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

<br />

*** ** * ** ***

Constants related to a media collection

## Summary

|                                                                                                                                                                                                                                             ### Constants                                                                                                                                                                                                                                              ||
|--------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [String](https://developer.android.com/reference/java/lang/String) | [ACCOUNT_CONFIGURATION_INTENT](https://developer.android.com/reference/android/provider/CloudMediaProviderContract.MediaCollectionInfo#ACCOUNT_CONFIGURATION_INTENT) [Intent](https://developer.android.com/reference/android/content/Intent)Intent to launch an[Activity](https://developer.android.com/reference/android/app/Activity)to allow users configure their media collection account information like the account name. |
| [String](https://developer.android.com/reference/java/lang/String) | [ACCOUNT_NAME](https://developer.android.com/reference/android/provider/CloudMediaProviderContract.MediaCollectionInfo#ACCOUNT_NAME) Name of the account that owns the media collection.                                                                                                                                                                                                                                           |
| [String](https://developer.android.com/reference/java/lang/String) | [LAST_MEDIA_SYNC_GENERATION](https://developer.android.com/reference/android/provider/CloudMediaProviderContract.MediaCollectionInfo#LAST_MEDIA_SYNC_GENERATION) Last[CloudMediaProviderContract.MediaColumns.SYNC_GENERATION](https://developer.android.com/reference/android/provider/CloudMediaProviderContract.MediaColumns#SYNC_GENERATION)in the media collection including deleted media items.                             |
| [String](https://developer.android.com/reference/java/lang/String) | [MEDIA_COLLECTION_ID](https://developer.android.com/reference/android/provider/CloudMediaProviderContract.MediaCollectionInfo#MEDIA_COLLECTION_ID) Media collection identifier The only requirement on the collection ID is uniqueness on a device.                                                                                                                                                                                |

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

### ACCOUNT_CONFIGURATION_INTENT

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

```
public static final String ACCOUNT_CONFIGURATION_INTENT
```

[Intent](https://developer.android.com/reference/android/content/Intent)Intent to launch an[Activity](https://developer.android.com/reference/android/app/Activity)to allow users configure their media collection account information like the account name.

Type: PARCELABLE

<br />

**See also:**

- [CloudMediaProvider.onGetMediaCollectionInfo(Bundle)](https://developer.android.com/reference/android/provider/CloudMediaProvider#onGetMediaCollectionInfo(android.os.Bundle))

Constant Value: "account_configuration_intent"  

### ACCOUNT_NAME

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

```
public static final String ACCOUNT_NAME
```

Name of the account that owns the media collection.

Type: STRING

<br />

**See also:**

- [CloudMediaProvider.onGetMediaCollectionInfo(Bundle)](https://developer.android.com/reference/android/provider/CloudMediaProvider#onGetMediaCollectionInfo(android.os.Bundle))

Constant Value: "account_name"  

### LAST_MEDIA_SYNC_GENERATION

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

```
public static final String LAST_MEDIA_SYNC_GENERATION
```

Last[CloudMediaProviderContract.MediaColumns.SYNC_GENERATION](https://developer.android.com/reference/android/provider/CloudMediaProviderContract.MediaColumns#SYNC_GENERATION)in the media collection including deleted media items.

Providers should associate a monotonically increasing sync generation to each media item change (insertion/deletion/update). This is useful for the OS to quickly identify exactly which media items have changed since a previous point in time.

Type: LONG

<br />

**See also:**

- [CloudMediaProviderContract.EXTRA_SYNC_GENERATION](https://developer.android.com/reference/android/provider/CloudMediaProviderContract#EXTRA_SYNC_GENERATION)
- [CloudMediaProvider.onGetMediaCollectionInfo(Bundle)](https://developer.android.com/reference/android/provider/CloudMediaProvider#onGetMediaCollectionInfo(android.os.Bundle))
- [CloudMediaProviderContract.MediaColumns.SYNC_GENERATION](https://developer.android.com/reference/android/provider/CloudMediaProviderContract.MediaColumns#SYNC_GENERATION)

Constant Value: "last_media_sync_generation"  

### MEDIA_COLLECTION_ID

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

```
public static final String MEDIA_COLLECTION_ID
```

Media collection identifier

The only requirement on the collection ID is uniqueness on a device.

This value will not be interpreted by the OS, however it will be used to check the validity of cached data and URI grants to client apps. Anytime the media or album ids get re-indexed, a new collection with a new and unique id should be created so that the OS can clear its cache and more importantly, revoke any URI grants to apps.

Apps are recommended to generate unique collection ids with,[UUID.randomUUID](https://developer.android.com/reference/java/util/UUID#randomUUID()). This is preferred to using a simple monotonic sequence because the provider data could get cleared and it might have to re-index media items on the device without any history of its last ID. With random UUIDs, if data gets cleared, a new one can easily be generated safely.

Type: STRING

<br />

**See also:**

- [CloudMediaProvider.onGetMediaCollectionInfo(Bundle)](https://developer.android.com/reference/android/provider/CloudMediaProvider#onGetMediaCollectionInfo(android.os.Bundle))

Constant Value: "media_collection_id"