Builder


class Builder
kotlin.Any
   ↳ android.app.HandoffActivityData.Builder

Builder for HandoffActivityData.

Summary

Public constructors
Builder(componentName: ComponentName)

Creates a builder for the given component name.

Public methods
HandoffActivityData

Builds the HandoffActivityData object.

HandoffActivityData.Builder

Specifies which extras will be passed to the activity with name getComponentName() in its launch intent.

HandoffActivityData.Builder
setFallbackUri(fallbackUri: Uri?)

Sets a fallback URI for this activity.

Public constructors

Builder

Builder(componentName: ComponentName)

Creates a builder for the given component name.

Parameters
componentName ComponentName: the component name of the activity to be launched.
This value cannot be null.

Public methods

build

fun build(): HandoffActivityData

Builds the HandoffActivityData object.

Return
HandoffActivityData the HandoffActivityData object.
This value cannot be null.

setExtras

fun setExtras(extras: PersistableBundle): HandoffActivityData.Builder

Specifies which extras will be passed to the activity with name getComponentName() in its launch intent. This information should allow the activity on the receiving devices to restore the state of the activity on the sending device.

If no extras are specified, the activity will be launched with an empty bundle for extras.

Any extras specified here must be safe to pass to another device, and thus should not reference any device-specific information such as file paths.

Parameters
extras PersistableBundle: the extras of the activity to be launched.
This value cannot be null.
Return
HandoffActivityData.Builder the builder.
This value cannot be null.

setFallbackUri

fun setFallbackUri(fallbackUri: Uri?): HandoffActivityData.Builder

Sets a fallback URI for this activity.

Parameters
fallbackUri Uri?: the fallback uri.
This value may be null.
Return
HandoffActivityData.Builder the builder.
This value cannot be null.