HandoffActivityParams.Builder
public
static
final
class
HandoffActivityParams.Builder
extends Object
| java.lang.Object | |
| ↳ | 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(boolean allowHandoffWithoutPackageInstalled)
Sets whether the activity should be handed off even if the package is not installed on the remote device. |
Inherited methods | |
|---|---|
Public constructors
Public methods
build
public HandoffActivityParams build ()
Builds the HandoffActivityParams object.
| Returns | |
|---|---|
HandoffActivityParams |
the HandoffActivityParams object.
This value cannot be null. |
setAllowHandoffWithoutPackageInstalled
public HandoffActivityParams.Builder setAllowHandoffWithoutPackageInstalled (boolean allowHandoffWithoutPackageInstalled)
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, ERROR(Activity.onHandoffActivityDataRequested()/android.app.Activity#onHandoffActivityDataRequested() 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 ERROR(HandoffActivityData.createWebHandoffData(String)/android.app.HandoffActivityData#createWebHandoffData(java.lang.String) HandoffActivityData.createWebHandoffData(String)) or by setting a fallback URL via ERROR(HandoffActivityData.Builder.setFallbackUrl(URL)/android.app.HandoffActivityData.Builder#setFallbackUrl(URL) 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. |
| Returns | |
|---|---|
HandoffActivityParams.Builder |
the builder.
This value cannot be null. |