CloudMediaProviderContract.MediaCollectionInfo


public static final class CloudMediaProviderContract.MediaCollectionInfo
extends Object

java.lang.Object
   ↳ android.provider.CloudMediaProviderContract.MediaCollectionInfo


Constants related to a media collection

Summary

Constants

String ACCOUNT_CONFIGURATION_INTENT

Intent Intent to launch an Activity to allow users configure their media collection account information like the account name.

String ACCOUNT_NAME

Name of the account that owns the media collection.

String LAST_MEDIA_SYNC_GENERATION

Last CloudMediaProviderContract.MediaColumns#SYNC_GENERATION in the media collection including deleted media items.

String MEDIA_COLLECTION_ID

Media collection identifier

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

Inherited methods

Constants

ACCOUNT_CONFIGURATION_INTENT

Added in API level 33
Also in R Extensions 3
public static final String ACCOUNT_CONFIGURATION_INTENT

Intent Intent to launch an Activity to allow users configure their media collection account information like the account name.

Type: PARCELABLE

Constant Value: "account_configuration_intent"

ACCOUNT_NAME

Added in API level 33
Also in R Extensions 3
public static final String ACCOUNT_NAME

Name of the account that owns the media collection.

Type: STRING

Constant Value: "account_name"

LAST_MEDIA_SYNC_GENERATION

Added in API level 33
Also in R Extensions 3
public static final String LAST_MEDIA_SYNC_GENERATION

Last 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

Constant Value: "last_media_sync_generation"

MEDIA_COLLECTION_ID

Added in API level 33
Also in R Extensions 3
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. 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

Constant Value: "media_collection_id"