# Capability.Builder

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

# Builder

*** ** * ** ***

Kotlin\|[Java](https://developer.android.com/reference/android/content/pm/Capability.Builder "View this page in Java")  

```
class Builder
```

|---|--------------------------------------------------------------------------------------------------------------------------------|
| [kotlin.Any](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html)                                                 ||
| ↳ | [android.content.pm.Capability.Builder](https://developer.android.com/reference/kotlin/android/content/pm/Capability.Builder#) |

Builder class for[Capability](https://developer.android.com/reference/kotlin/android/content/pm/Capability).

## Summary

|                                                                                                         Public constructors                                                                                                          ||
|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---|
| [Builder](https://developer.android.com/reference/kotlin/android/content/pm/Capability.Builder#Builder(kotlin.String))`(`name:` `[String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`)` Constructor. |

|                                                                                                                                                     Public methods                                                                                                                                                     ||
|--------------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [Capability](https://developer.android.com/reference/kotlin/android/content/pm/Capability) | [build](https://developer.android.com/reference/kotlin/android/content/pm/Capability.Builder#build())`()` Creates an instance of[Capability](https://developer.android.com/reference/kotlin/android/content/pm/Capability) |

## Public constructors

### Builder

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

```
Builder(name: String)
```

Constructor.

|                                                                                                                        Parameters                                                                                                                         ||
|--------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `name` | [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html):Name of the capability, usually maps to a built-in intent, e.g. actions.intent.GET_MESSAGE. Note the character "/" is not permitted. This value cannot be`null`. |

|                                           Exceptions                                           ||
|--------------------------------------|----------------------------------------------------------|
| `java.lang.IllegalArgumentException` | If specified capability name contains the character "/". |

## Public methods

### build

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

```
fun build(): Capability
```

Creates an instance of[Capability](https://developer.android.com/reference/kotlin/android/content/pm/Capability)

|                                                         Return                                                          ||
|--------------------------------------------------------------------------------------------|-----------------------------|
| [Capability](https://developer.android.com/reference/kotlin/android/content/pm/Capability) | This value cannot be`null`. |