Builder
class Builder
| kotlin.Any | |
| ↳ | android.app.HandoffActivityParams.Builder |
Builder for HandoffActivityParams.
Summary
| Public constructors | |
|---|---|
Builder()Creates a new builder for |
|
| Public methods | |
|---|---|
| HandoffActivityParams |
build()Builds the |
| HandoffActivityParams.Builder |
setAllowHandoffWithoutPackageInstalled(allowHandoffWithoutPackageInstalled: Boolean)Sets whether the activity should be handed off even if the package is not installed on the remote device. |
Public constructors
Public methods
build
fun build(): HandoffActivityParams
Builds the HandoffActivityParams object.
| Return | |
|---|---|
HandoffActivityParams |
the HandoffActivityParams object. This value cannot be null. |
setAllowHandoffWithoutPackageInstalled
fun setAllowHandoffWithoutPackageInstalled(allowHandoffWithoutPackageInstalled: Boolean): HandoffActivityParams.Builder
Sets whether the activity should be handed off even if the package is not installed on the remote device. If this is set to false, this activity will not appear as a Handoff suggestion on devices which do not have the package installed.
If set to true, android.app.Activity#onHandoffActivityDataRequested() will be called even if the package is not installed on the remote device. The returned HandoffActivityData must contain a web URL - either created via android.app.HandoffActivityData#createWebHandoffData(java.lang.String) or by setting a fallback URL via android.app.HandoffActivityData.Builder#setFallbackUrl(URL). If one is not present, the user will be shown an error message.
| Parameters | |
|---|---|
allowHandoffWithoutPackageInstalled |
Boolean: whether the activity should be handed off even if the package is not installed on the remote device. |
| Return | |
|---|---|
HandoffActivityParams.Builder |
the builder. This value cannot be null. |