StartComponentRequest.Builder
class StartComponentRequest.Builder
Summary
Public constructors |
|
---|---|
Builder() |
Public functions |
|
---|---|
StartComponentRequest.Builder |
Adds an extra string to the wakeup request that will be provided to the targeted app. |
StartComponentRequest.Builder |
Adds an extra boolean to the wakeup request that will be provided to the targeted app. |
StartComponentRequest.Builder |
Adds an extra int to the wakeup request that will be provided to the targeted app. |
StartComponentRequest.Builder |
Adds an extra ByteArray to the wakeup request that will be provided to the targeted app. |
StartComponentRequest |
build() Builds the |
<Error class: unknown class> |
(Required) Sets the intent action used to determine the target of the wakeup request. |
<Error class: unknown class> |
(Required) Sets the user-visible reason for this request. |
Public constructors
Public functions
addExtra
fun addExtra(key: String, value: String): StartComponentRequest.Builder
Adds an extra string to the wakeup request that will be provided to the targeted app.
addExtra
fun addExtra(key: String, value: Boolean): StartComponentRequest.Builder
Adds an extra boolean to the wakeup request that will be provided to the targeted app.
addExtra
fun addExtra(key: String, value: Int): StartComponentRequest.Builder
Adds an extra int to the wakeup request that will be provided to the targeted app.
addExtra
fun addExtra(key: String, value: ByteArray): StartComponentRequest.Builder
Adds an extra ByteArray to the wakeup request that will be provided to the targeted app.
build
fun build(): StartComponentRequest
Builds the StartComponentRequest
from this builder.
Throws | |
---|---|
java.lang.IllegalArgumentException: java.lang.IllegalArgumentException |
if required parameters are not specified. |
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.
setReason
fun setReason(reason: String): <Error class: unknown class>
(Required) Sets the user-visible reason for this request.