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