Stay organized with collections
Save and categorize content based on your preferences.
StartComponentRequest.Builder
class StartComponentRequest.Builder
Summary
Public constructors
Public functions
setAction
fun setAction(action: String): <Error class: unknown class>
(Required) Sets the intent action used to determine the target of the wakeup request.
This intent action is used to resolve the target component (only Activity targets are currently supported) on the receiving device.
Public properties
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,["# StartComponentRequest.Builder\n=============================\n\n*** ** * ** ***\n\nKotlin \\|[Java](/reference/com/google/ambient/crossdevice/wakeup/StartComponentRequest.Builder \"View this page in Java\")\n\n\n```\nclass StartComponentRequest.Builder\n```\n\n\u003cbr /\u003e\n\n*** ** * ** ***\n\nSummary\n-------\n\n| ### Public constructors ||\n|----------------------------------------------------------------------------------------------------------------|---|\n| [Builder](/reference/kotlin/com/google/ambient/crossdevice/wakeup/StartComponentRequest.Builder#Builder())`()` |\n\n| ### Public functions ||\n|------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| [StartComponentRequest.Builder](/reference/kotlin/com/google/ambient/crossdevice/wakeup/StartComponentRequest.Builder) | [addExtra](/reference/kotlin/com/google/ambient/crossdevice/wakeup/StartComponentRequest.Builder#addExtra(kotlin.String,kotlin.String))`(key: `[String](/reference/kotlin/kotlin/String)`, value: `[String](/reference/kotlin/kotlin/String)`)` Adds an extra string to the wakeup request that will be provided to the targeted app. |\n| [StartComponentRequest.Builder](/reference/kotlin/com/google/ambient/crossdevice/wakeup/StartComponentRequest.Builder) | [addExtra](/reference/kotlin/com/google/ambient/crossdevice/wakeup/StartComponentRequest.Builder#addExtra(kotlin.String,kotlin.Boolean))`(key: `[String](/reference/kotlin/kotlin/String)`, value: `[Boolean](/reference/kotlin/kotlin/Boolean)`)` Adds an extra boolean to the wakeup request that will be provided to the targeted app. |\n| [StartComponentRequest.Builder](/reference/kotlin/com/google/ambient/crossdevice/wakeup/StartComponentRequest.Builder) | [addExtra](/reference/kotlin/com/google/ambient/crossdevice/wakeup/StartComponentRequest.Builder#addExtra(kotlin.String,kotlin.Int))`(key: `[String](/reference/kotlin/kotlin/String)`, value: `[Int](/reference/kotlin/kotlin/Int)`)` Adds an extra int to the wakeup request that will be provided to the targeted app. |\n| [StartComponentRequest.Builder](/reference/kotlin/com/google/ambient/crossdevice/wakeup/StartComponentRequest.Builder) | [addExtra](/reference/kotlin/com/google/ambient/crossdevice/wakeup/StartComponentRequest.Builder#addExtra(kotlin.String,kotlin.ByteArray))`(key: `[String](/reference/kotlin/kotlin/String)`, value: `[ByteArray](/reference/kotlin/kotlin/ByteArray)`)` Adds an extra ByteArray to the wakeup request that will be provided to the targeted app. |\n| [StartComponentRequest](/reference/kotlin/com/google/ambient/crossdevice/wakeup/StartComponentRequest) | [build](/reference/kotlin/com/google/ambient/crossdevice/wakeup/StartComponentRequest.Builder#build())`()` Builds the [StartComponentRequest](/reference/kotlin/com/google/ambient/crossdevice/wakeup/StartComponentRequest) from this builder. |\n| [\u003cError class: unknown class\u003e](/reference/kotlin/[JVM root]/\u003cError class: unknown class\u003e) | [setAction](/reference/kotlin/com/google/ambient/crossdevice/wakeup/StartComponentRequest.Builder#setAction(kotlin.String))`(action: `[String](/reference/kotlin/kotlin/String)`)` (Required) Sets the intent action used to determine the target of the wakeup request. |\n| [\u003cError class: unknown class\u003e](/reference/kotlin/[JVM root]/\u003cError class: unknown class\u003e) | [setReason](/reference/kotlin/com/google/ambient/crossdevice/wakeup/StartComponentRequest.Builder#setReason(kotlin.String))`(reason: `[String](/reference/kotlin/kotlin/String)`)` (Required) Sets the user-visible reason for this request. |\n\n| ### Public properties ||\n|----------------------------------------------|----------------------------------------------------------------------------------------------------------|\n| [String](/reference/kotlin/kotlin/String)`?` | [action](/reference/kotlin/com/google/ambient/crossdevice/wakeup/StartComponentRequest.Builder#action()) |\n| [String](/reference/kotlin/kotlin/String)`?` | [reason](/reference/kotlin/com/google/ambient/crossdevice/wakeup/StartComponentRequest.Builder#reason()) |\n\nPublic constructors\n-------------------\n\n### Builder\n\n```\nBuilder()\n```\n\nPublic functions\n----------------\n\n### addExtra\n\n```\nfun addExtra(key: String, value: String): StartComponentRequest.Builder\n```\n\nAdds an extra string to the wakeup request that will be provided to the targeted app. \n\n### addExtra\n\n```\nfun addExtra(key: String, value: Boolean): StartComponentRequest.Builder\n```\n\nAdds an extra boolean to the wakeup request that will be provided to the targeted app. \n\n### addExtra\n\n```\nfun addExtra(key: String, value: Int): StartComponentRequest.Builder\n```\n\nAdds an extra int to the wakeup request that will be provided to the targeted app. \n\n### addExtra\n\n```\nfun addExtra(key: String, value: ByteArray): StartComponentRequest.Builder\n```\n\nAdds an extra ByteArray to the wakeup request that will be provided to the targeted app. \n\n### build\n\n```\nfun build(): StartComponentRequest\n```\n\nBuilds the [StartComponentRequest](/reference/kotlin/com/google/ambient/crossdevice/wakeup/StartComponentRequest) from this builder. \n\n| Throws ||\n|----------------------------------------------------------------------------------------------------------------------------------|-------------------------------------------|\n| `java.lang.IllegalArgumentException: `[java.lang.IllegalArgumentException](/reference/kotlin/java/lang/IllegalArgumentException) | if required parameters are not specified. |\n\n### setAction\n\n```\nfun setAction(action: String): \u003cError class: unknown class\u003e\n```\n\n(Required) Sets the intent action used to determine the target of the wakeup request.\n\nThis intent action is used to resolve the target component (only Activity targets are currently supported) on the receiving device. \n\n### setReason\n\n```\nfun setReason(reason: String): \u003cError class: unknown class\u003e\n```\n\n(Required) Sets the user-visible reason for this request.\n\nPublic properties\n-----------------\n\n### action\n\n```\nvar action: String?\n``` \n\n### reason\n\n```\nvar reason: String?\n```"]]