Stay organized with collections
Save and categorize content based on your preferences.
Builder
class Builder
Builder class for Capability
.
Summary
Public constructors |
Constructor.
|
Public constructors
Builder
Builder(name: String)
Constructor.
Parameters |
name |
String: 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
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-02-10 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-02-10 UTC."],[],[],null,["# Capability.Builder\n\nAdded in [API level 33](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)\n\nBuilder\n=======\n\n*** ** * ** ***\n\nKotlin \\|[Java](/reference/android/content/pm/Capability.Builder \"View this page in Java\") \n\n```\nclass Builder\n```\n\n|---|--------------------------------------------|\n| [kotlin.Any](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html) ||\n| ↳ | [android.content.pm.Capability.Builder](#) |\n\nBuilder class for [Capability](/reference/kotlin/android/content/pm/Capability).\n\nSummary\n-------\n\n| Public constructors ||\n|-----------------------------------------------------------------------------------------------------------------------------------------------|---|\n| [Builder](#Builder(kotlin.String))`(`name:` `[String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`)` Constructor. |\n\n| Public methods ||\n|---------------------------------------------------------------|------------------------------------------------------------------------------------------------------------|\n| [Capability](/reference/kotlin/android/content/pm/Capability) | [build](#build())`()` Creates an instance of [Capability](/reference/kotlin/android/content/pm/Capability) |\n\nPublic constructors\n-------------------\n\n### Builder\n\nAdded in [API level 33](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nBuilder(name: String)\n```\n\nConstructor.\n\n| Parameters ||\n|--------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `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`. |\n\n| Exceptions ||\n|--------------------------------------|----------------------------------------------------------|\n| `java.lang.IllegalArgumentException` | If specified capability name contains the character \"/\". |\n\nPublic methods\n--------------\n\n### build\n\nAdded in [API level 33](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nfun build(): Capability\n```\n\nCreates an instance of [Capability](/reference/kotlin/android/content/pm/Capability)\n\n| Return ||\n|---------------------------------------------------------------|------------------------------|\n| [Capability](/reference/kotlin/android/content/pm/Capability) | This value cannot be `null`. |"]]