Builder


class Builder
kotlin.Any
   ↳ android.provider.CloudMediaProviderContract.Capabilities.Builder

Builder for a CloudMediaProviderContract.Capabilities object.

Summary

Public constructors

Public methods
CloudMediaProviderContract.Capabilities

Create a new CloudMediaProviderContract.Capabilities object with the current builder's Capabilities.

CloudMediaProviderContract.Capabilities.Builder

Set true if the CloudMediaProvider will return user albums as a grouped category.

CloudMediaProviderContract.Capabilities.Builder

The MediaCategories capability informs that category related APIs are supported and can be invoked on this provider.

CloudMediaProviderContract.Capabilities.Builder

The SearchEnabled capability informs that search related APIs are supported and can be invoked on this provider.

Public constructors

Builder

Builder()

Public methods

build

fun build(): CloudMediaProviderContract.Capabilities

Create a new CloudMediaProviderContract.Capabilities object with the current builder's Capabilities.

Return
CloudMediaProviderContract.Capabilities This value cannot be null.

setAlbumsAsCategoryEnabled

fun setAlbumsAsCategoryEnabled(enabled: Boolean): CloudMediaProviderContract.Capabilities.Builder

Set true if the CloudMediaProvider will return user albums as a grouped category. When this capability is enabled, CloudMediaProvider.onQueryAlbums will no longer be called to sync the users albums, and it is expected that a category with the type MEDIA_CATEGORY_TYPE_USER_ALBUMS will be provided in the CloudMediaProvider.onQueryMediaCategories for providing the user's custom albums. If no such category is returned, then there will be no data for user custom albums. NOTE: This capability requires the Capabilities.isMediaCategoriesEnabled capability to also be enabled for the CloudMediaProvider. If it is not, this Capability has no effect and will be ignored.

Parameters
enabled Boolean: true if this capability is supported, the default value is false.
Return
CloudMediaProviderContract.Capabilities.Builder This value cannot be null.

setMediaCategoriesEnabled

fun setMediaCategoriesEnabled(enabled: Boolean): CloudMediaProviderContract.Capabilities.Builder

The MediaCategories capability informs that category related APIs are supported and can be invoked on this provider.

Parameters
enabled Boolean: true if this capability is supported, the default value is false.
Return
CloudMediaProviderContract.Capabilities.Builder This value cannot be null.

setSearchEnabled

fun setSearchEnabled(enabled: Boolean): CloudMediaProviderContract.Capabilities.Builder

The SearchEnabled capability informs that search related APIs are supported and can be invoked on this provider.

Parameters
enabled Boolean: true if this capability is supported, the default value is false.
Return
CloudMediaProviderContract.Capabilities.Builder This value cannot be null.