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

# Capabilities

*** ** * ** ***

```
class Capabilities : Parcelable
```

|---|---|
| [kotlin.Any](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html) ||
| ↳ | [android.provider.CloudMediaProviderContract.Capabilities](https://developer.android.com/reference/kotlin/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 `https://developer.android.com/reference/kotlin/android/provider/CloudMediaProvider#onGetCapabilities()`. This object enumerates which capabilities are provided by the CloudMediaProvider implementation that supplied this object.

## Summary

| Nested classes ||
|---|---|
|   | `https://developer.android.com/reference/kotlin/android/provider/CloudMediaProviderContract.Capabilities.Builder` Builder for a `https://developer.android.com/reference/kotlin/android/provider/CloudMediaProviderContract.Capabilities#` object. |

| Inherited constants ||
|---|---|
| From class `https://developer.android.com/reference/kotlin/android/os/Parcelable.html#` |---|---| | `https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/android/os/Parcelable.html#CONTENTS_FILE_DESCRIPTOR:kotlin.Int` Descriptor bit used with `https://developer.android.com/reference/kotlin/android/os/Parcelable.html#describeContents()`: indicates that the Parcelable object's flattened representation includes a file descriptor. <br /> | | `https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/android/os/Parcelable.html#PARCELABLE_WRITE_RETURN_VALUE:kotlin.Int` Flag for use with `https://developer.android.com/reference/kotlin/android/os/Parcelable.html#writeToParcel(android.os.Parcel,%20kotlin.Int)`: the object being written is a return value, that is the result of a function such as "`Parcelable someFunction()`", "`void someFunction(out Parcelable)`", or "`void someFunction(inout Parcelable)`". Some implementations may want to release resources at this point. <br /> | ||

| Public methods ||
|---|---|
| [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | `https://developer.android.com/reference/kotlin/android/provider/CloudMediaProviderContract.Capabilities#describeContents()()` Implemented for `https://developer.android.com/reference/kotlin/android/os/Parcelable.html#` |
| [Boolean](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html) | `https://developer.android.com/reference/kotlin/android/provider/CloudMediaProviderContract.Capabilities#isAlbumsAsCategoryEnabled()()` If the CloudMediaProvider will return user albums as a grouped category. |
| [Boolean](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html) | `https://developer.android.com/reference/kotlin/android/provider/CloudMediaProviderContract.Capabilities#isMediaCategoriesEnabled()()` If the CloudMediaProvider supports MediaCategories. |
| [Boolean](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html) | `https://developer.android.com/reference/kotlin/android/provider/CloudMediaProviderContract.Capabilities#isSearchEnabled()()` If the CloudMediaProvider supports Search functionality. |
| [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) | `https://developer.android.com/reference/kotlin/android/provider/CloudMediaProviderContract.Capabilities#toString()()` Returns a string representation of the object. |
| [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html) | `https://developer.android.com/reference/kotlin/android/provider/CloudMediaProviderContract.Capabilities#writeToParcel(android.os.Parcel,%20kotlin.Int)(dest: https://developer.android.com/reference/kotlin/android/os/Parcel.html#, flags: https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)` Implemented for `https://developer.android.com/reference/kotlin/android/os/Parcelable.html#` |

| Properties ||
|---|---|
| static [Parcelable.Creator](https://developer.android.com/reference/kotlin/android/os/Parcelable.Creator.html#)\<[CloudMediaProviderContract.Capabilities](https://developer.android.com/reference/kotlin/android/provider/CloudMediaProviderContract.Capabilities#)!\> | `https://developer.android.com/reference/kotlin/android/provider/CloudMediaProviderContract.Capabilities#CREATOR:android.os.Parcelable.Creator` Implemented for `https://developer.android.com/reference/kotlin/android/os/Parcelable.html#` |

## Public methods

### describeContents

Added in [API level 36](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)

```
fun describeContents(): Int
```

Implemented for `https://developer.android.com/reference/kotlin/android/os/Parcelable.html#`

| Return ||
|---|---|
| `https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html` | a bitmask indicating the set of special object types marshaled by this Parcelable object instance. Value is either `0` or - `https://developer.android.com/reference/kotlin/android/os/Parcelable.html#CONTENTS_FILE_DESCRIPTOR:kotlin.Int` |

### isAlbumsAsCategoryEnabled

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

```
fun isAlbumsAsCategoryEnabled(): Boolean
```

If the CloudMediaProvider will return user albums as a grouped category. When this capability is enabled, `https://developer.android.com/reference/kotlin/android/provider/CloudMediaProvider#onQueryAlbums(android.os.Bundle)` will no longer be called to sync the users albums, and it is expected that a category with the type `https://developer.android.com/reference/kotlin/android/provider/CloudMediaProviderContract#MEDIA_CATEGORY_TYPE_USER_ALBUMS:kotlin.String` will be provided in the `https://developer.android.com/reference/kotlin/android/provider/CloudMediaProvider#onQueryMediaCategories(kotlin.String,%20android.os.Bundle,%20android.os.CancellationSignal)` 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 `https://developer.android.com/reference/kotlin/android/provider/CloudMediaProviderContract.Capabilities#isMediaCategoriesEnabled()` capability to also be enabled for the CloudMediaProvider. If it is not, this Capability has no effect and will be ignored.

| Return ||
|---|---|
| `https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html` | true if albums will be returned as a MediaCategory. |

**See Also**

- `https://developer.android.com/reference/kotlin/android/provider/CloudMediaProvider#onQueryMediaCategories(kotlin.String,%20android.os.Bundle,%20android.os.CancellationSignal)`
- `https://developer.android.com/reference/kotlin/android/provider/CloudMediaProviderContract#MEDIA_CATEGORY_TYPE_USER_ALBUMS:kotlin.String`

### isMediaCategoriesEnabled

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

```
fun isMediaCategoriesEnabled(): Boolean
```

If the CloudMediaProvider supports MediaCategories. In order for MediaCategories to be enabled the CloudMediaProvider needs to implement the following APIs:

| Return ||
|---|---|
| `https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html` | true if media categories are enabled for this CloudMediaProvider. |

**See Also**

- `https://developer.android.com/reference/kotlin/android/provider/CloudMediaProvider#onQueryMediaCategories(kotlin.String,%20android.os.Bundle,%20android.os.CancellationSignal)`
- `https://developer.android.com/reference/kotlin/android/provider/CloudMediaProvider#onQueryMediaSets(kotlin.String,%20android.os.Bundle,%20android.os.CancellationSignal)`

### isSearchEnabled

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

```
fun isSearchEnabled(): Boolean
```

If the CloudMediaProvider supports Search functionality. In order for search to be enabled the CloudMediaProvider needs to implement the following APIs:

| Return ||
|---|---|
| `https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html` | true if search is enabled for this CloudMediaProvider. |

**See Also**

- `https://developer.android.com/reference/kotlin/android/provider/CloudMediaProvider#onQuerySearchSuggestions(kotlin.String,%20android.os.Bundle,%20android.os.CancellationSignal)`

### toString

Added in [API level 36](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)

```
fun toString(): String
```

Returns a string representation of the object.

| Return ||
|---|---|
| `https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html` | a string representation of the object. |

### writeToParcel

Added in [API level 36](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)

```
fun writeToParcel(
    dest: Parcel, 
    flags: Int
): Unit
```

Implemented for `https://developer.android.com/reference/kotlin/android/os/Parcelable.html#`

| Parameters ||
|---|---|
| `dest` | [Parcel](https://developer.android.com/reference/kotlin/android/os/Parcel.html#): This value cannot be `null`. |
| `flags` | [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html): Additional flags about how the object should be written. May be 0 or `https://developer.android.com/reference/kotlin/android/os/Parcelable.html#PARCELABLE_WRITE_RETURN_VALUE:kotlin.Int`. Value is either `0` or a combination of the following: - `https://developer.android.com/reference/kotlin/android/os/Parcelable.html#PARCELABLE_WRITE_RETURN_VALUE:kotlin.Int` |

## Properties

### CREATOR

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

```
static val CREATOR: Parcelable.Creator<CloudMediaProviderContract.Capabilities!>
```

Implemented for `https://developer.android.com/reference/kotlin/android/os/Parcelable.html#`