MediaCollectionInfo


class MediaCollectionInfo
kotlin.Any
   ↳ android.provider.CloudMediaProviderContract.MediaCollectionInfo

Constants related to a media collection

Summary

Constants
static String

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

static String

Name of the account that owns the media collection.

static String

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

static String

Media collection identifier

Constants

ACCOUNT_CONFIGURATION_INTENT

static val ACCOUNT_CONFIGURATION_INTENT: String

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

Type: PARCELABLE

Value: "account_configuration_intent"

ACCOUNT_NAME

static val ACCOUNT_NAME: String

Name of the account that owns the media collection.

Type: STRING

Value: "account_name"

LAST_MEDIA_SYNC_GENERATION

static val LAST_MEDIA_SYNC_GENERATION: String

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

Value: "last_media_sync_generation"

MEDIA_COLLECTION_ID

static val MEDIA_COLLECTION_ID: String

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

Value: "media_collection_id"