Stay organized with collections
Save and categorize content based on your preferences.
Builder
class Builder
Builder class for CapabilityParams
.
Summary
Public constructors |
Constructor.
|
Public constructors
Builder
Builder(
key: String,
value: String)
Constructor.
Parameters |
key |
String: key of the capability parameter. Note the character "/" is not permitted. This value cannot be null . |
value |
String: The primary name of value in the CapabilityParams , cannot be empty. This value cannot be null . |
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,["# CapabilityParams.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/CapabilityParams.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.CapabilityParams.Builder](#) |\n\nBuilder class for [CapabilityParams](/reference/kotlin/android/content/pm/CapabilityParams).\n\nSummary\n-------\n\n| Public constructors ||\n|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---|\n| [Builder](#Builder(kotlin.String,%20kotlin.String))`(`key:` `[String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`, `value:` `[String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`)` Constructor. |\n\n| Public methods ||\n|---------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| [CapabilityParams.Builder](#) | [addAlias](#addAlias(kotlin.String))`(`alias:` `[String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`)` Add an alias in the [CapabilityParams](/reference/kotlin/android/content/pm/CapabilityParams). |\n| [CapabilityParams](/reference/kotlin/android/content/pm/CapabilityParams) | [build](#build())`()` Creates an instance of [CapabilityParams](/reference/kotlin/android/content/pm/CapabilityParams) |\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(\n key: String, \n value: String)\n```\n\nConstructor.\n\n| Parameters ||\n|---------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `key` | [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html): key of the capability parameter. Note the character \"/\" is not permitted. This value cannot be `null`. |\n| `value` | [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html): The primary name of value in the [CapabilityParams](/reference/kotlin/android/content/pm/CapabilityParams), cannot be empty. This value cannot be `null`. |\n\nPublic methods\n--------------\n\n### addAlias\n\nAdded in [API level 33](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nfun addAlias(alias: String): CapabilityParams.Builder\n```\n\nAdd an alias in the [CapabilityParams](/reference/kotlin/android/content/pm/CapabilityParams).\n\n| Parameters ||\n|---------|----------------------------------------------------------------------------------------------------------------|\n| `alias` | [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html): This value cannot be `null`. |\n\n| Return ||\n|-------------------------------|------------------------------|\n| [CapabilityParams.Builder](#) | This value cannot be `null`. |\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(): CapabilityParams\n```\n\nCreates an instance of [CapabilityParams](/reference/kotlin/android/content/pm/CapabilityParams)\n\n| Return ||\n|---------------------------------------------------------------------------|------------------------------|\n| [CapabilityParams](/reference/kotlin/android/content/pm/CapabilityParams) | This value cannot be `null`. |\n\n| Exceptions ||\n|--------------------------------------|----------------------------------|\n| `java.lang.IllegalArgumentException` | If the specified value is empty. |"]]