Added in [API level 37](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels) Summary: [Ctors](https://developer.android.com/reference/android/app/HandoffActivityData.Builder#pubctors) \| [Methods](https://developer.android.com/reference/android/app/HandoffActivityData.Builder#pubmethods) \| [Inherited Methods](https://developer.android.com/reference/android/app/HandoffActivityData.Builder#inhmethods)

# HandoffActivityData.Builder

*** ** * ** ***

` public static final class HandoffActivityData.Builder `   
` extends https://developer.android.com/reference/java/lang/Object ` ` `

|---|---|
| [java.lang.Object](https://developer.android.com/reference/java/lang/Object) ||
| ↳ | android.app.HandoffActivityData.Builder |

<br />

*** ** * ** ***

Builder for `https://developer.android.com/reference/android/app/HandoffActivityData`.

## Summary

| ### Public constructors ||
|---|---|
| ` https://developer.android.com/reference/android/app/HandoffActivityData.Builder#Builder(android.content.ComponentName)(https://developer.android.com/reference/android/content/ComponentName componentName) ` Creates a builder for the given component name. |

| ### Public methods ||
|---|---|
| ` https://developer.android.com/reference/android/app/HandoffActivityData` | ` https://developer.android.com/reference/android/app/HandoffActivityData.Builder#build()() ` Builds the `https://developer.android.com/reference/android/app/HandoffActivityData` object. |
| ` https://developer.android.com/reference/android/app/HandoffActivityData.Builder` | ` https://developer.android.com/reference/android/app/HandoffActivityData.Builder#setExtras(android.os.PersistableBundle)(https://developer.android.com/reference/android/os/PersistableBundle extras) ` Specifies which extras will be passed to the activity with name `https://developer.android.com/reference/android/app/HandoffActivityData#getComponentName()` in its launch intent. |
| ` https://developer.android.com/reference/android/app/HandoffActivityData.Builder` | ` https://developer.android.com/reference/android/app/HandoffActivityData.Builder#setFallbackUri(android.net.Uri)(https://developer.android.com/reference/android/net/Uri fallbackUri) ` Sets a fallback URI for this activity. |

### Inherited methods

From class ` https://developer.android.com/reference/java/lang/Object ` ` https://developer.android.com/reference/java/lang/Object` ` https://developer.android.com/reference/java/lang/Object#clone()() `

Creates and returns a copy of this object.
` boolean` ` https://developer.android.com/reference/java/lang/Object#equals(java.lang.Object)(https://developer.android.com/reference/java/lang/Object obj) `

Indicates whether some other object is "equal to" this one.
` void` ` https://developer.android.com/reference/java/lang/Object#finalize()() `

Called by the garbage collector on an object when garbage collection determines that there are no more references to the object.
` final https://developer.android.com/reference/java/lang/Class<?>` ` https://developer.android.com/reference/java/lang/Object#getClass()() `

Returns the runtime class of this `Object`.
` int` ` https://developer.android.com/reference/java/lang/Object#hashCode()() `

Returns a hash code value for the object.
` final void` ` https://developer.android.com/reference/java/lang/Object#notify()() `

Wakes up a single thread that is waiting on this object's monitor.
` final void` ` https://developer.android.com/reference/java/lang/Object#notifyAll()() `

Wakes up all threads that are waiting on this object's monitor.
` https://developer.android.com/reference/java/lang/String` ` https://developer.android.com/reference/java/lang/Object#toString()() `

Returns a string representation of the object.
` final void` ` https://developer.android.com/reference/java/lang/Object#wait(long,%20int)(long timeoutMillis, int nanos) `

Causes the current thread to wait until it is awakened, typically by being *notified* or *interrupted*, or until a certain amount of real time has elapsed.
` final void` ` https://developer.android.com/reference/java/lang/Object#wait(long)(long timeoutMillis) `

Causes the current thread to wait until it is awakened, typically by being *notified* or *interrupted*, or until a certain amount of real time has elapsed.
` final void` ` https://developer.android.com/reference/java/lang/Object#wait()() `

Causes the current thread to wait until it is awakened, typically by being *notified* or *interrupted*.

## Public constructors

### Builder

Added in [API level 37](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public Builder (ComponentName componentName)
```

Creates a builder for the given component name.

<br />

| Parameters ||
|---|---|
| `componentName` | `ComponentName`: the component name of the activity to be launched. This value cannot be `null`. <br /> |

## Public methods

### build

Added in [API level 37](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public HandoffActivityData build ()
```

Builds the `https://developer.android.com/reference/android/app/HandoffActivityData` object.

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/app/HandoffActivityData` | the `https://developer.android.com/reference/android/app/HandoffActivityData` object. This value cannot be `null`. <br /> |

### setExtras

Added in [API level 37](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public HandoffActivityData.Builder setExtras (PersistableBundle extras)
```

Specifies which extras will be passed to the activity with name `https://developer.android.com/reference/android/app/HandoffActivityData#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.

<br />

| Parameters ||
|---|---|
| `extras` | `PersistableBundle`: the extras of the activity to be launched. This value cannot be `null`. <br /> |

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/app/HandoffActivityData.Builder` | the builder. This value cannot be `null`. <br /> |

### setFallbackUri

Added in [API level 37](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public HandoffActivityData.Builder setFallbackUri (Uri fallbackUri)
```

Sets a fallback URI for this activity.

<br />

| Parameters ||
|---|---|
| `fallbackUri` | `Uri`: the fallback uri. This value may be `null`. <br /> |

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/app/HandoffActivityData.Builder` | the builder. This value cannot be `null`. <br /> |