CloudMediaProviderContract.Capabilities
public
static
final
class
CloudMediaProviderContract.Capabilities
extends Object
implements
Parcelable
| java.lang.Object | |
| ↳ | android.provider.CloudMediaProviderContract.Capabilities |
Information about what capabilities a CloudMediaProvider can support. This
will be used by the system to inform which APIs should be expected to return
data. This object is returned from CloudMediaProvider.onGetCapabilities.
This object enumerates which capabilities are provided by the
CloudMediaProvider implementation that supplied this object.
See also:
Summary
Nested classes | |
|---|---|
class |
CloudMediaProviderContract.Capabilities.Builder
Builder for a |
Inherited constants |
|---|
Fields | |
|---|---|
public
static
final
Creator<CloudMediaProviderContract.Capabilities> |
CREATOR
Implemented for |
Public methods | |
|---|---|
int
|
describeContents()
Implemented for |
boolean
|
isAlbumsAsCategoryEnabled()
If the CloudMediaProvider will return user albums as a grouped category. |
boolean
|
isMediaCategoriesEnabled()
If the CloudMediaProvider supports MediaCategories. |
boolean
|
isSearchEnabled()
If the CloudMediaProvider supports Search functionality. |
void
|
writeToParcel(Parcel dest, int flags)
Implemented for |
Inherited methods | |
|---|---|
Fields
CREATOR
public static final Creator<CloudMediaProviderContract.Capabilities> CREATOR
Implemented for Parcelable
Public methods
describeContents
public int describeContents ()
Implemented for Parcelable
| Returns | |
|---|---|
int |
a bitmask indicating the set of special object types marshaled
by this Parcelable object instance.
Value is either 0 or CONTENTS_FILE_DESCRIPTOR |
isAlbumsAsCategoryEnabled
public boolean isAlbumsAsCategoryEnabled ()
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 CloudMediaProviderContract.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.
| Returns | |
|---|---|
boolean |
true if albums will be returned as a MediaCategory. |
isMediaCategoriesEnabled
public boolean isMediaCategoriesEnabled ()
If the CloudMediaProvider supports MediaCategories. In order for MediaCategories to be enabled the CloudMediaProvider needs to implement the following APIs:
| Returns | |
|---|---|
boolean |
true if media categories are enabled for this CloudMediaProvider. |
isSearchEnabled
public boolean isSearchEnabled ()
If the CloudMediaProvider supports Search functionality. In order for search to be enabled the CloudMediaProvider needs to implement the following APIs:
| Returns | |
|---|---|
boolean |
true if search is enabled for this CloudMediaProvider. |
writeToParcel
public void writeToParcel (Parcel dest, int flags)
Implemented for Parcelable
| Parameters | |
|---|---|
dest |
Parcel: This value cannot be null. |
flags |
int: Additional flags about how the object should be written.
May be 0 or Parcelable.PARCELABLE_WRITE_RETURN_VALUE.
Value is either 0 or a combination of Parcelable.PARCELABLE_WRITE_RETURN_VALUE, and android.os.Parcelable.PARCELABLE_ELIDE_DUPLICATES |
Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
Last updated 2025-09-17 UTC.