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

# ClipData.Item.Builder

*** ** * ** ***

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

|---|---|
| [java.lang.Object](https://developer.android.com/reference/java/lang/Object) ||
| ↳ | android.content.ClipData.Item.Builder |

<br />

*** ** * ** ***

A builder for a ClipData Item.

## Summary

| ### Public constructors ||
|---|---|
| ` https://developer.android.com/reference/android/content/ClipData.Item.Builder#Builder()() ` |

| ### Public methods ||
|---|---|
| ` https://developer.android.com/reference/android/content/ClipData.Item` | ` https://developer.android.com/reference/android/content/ClipData.Item.Builder#build()() ` Constructs a new Item with the properties set on this builder. |
| ` https://developer.android.com/reference/android/content/ClipData.Item.Builder` | ` https://developer.android.com/reference/android/content/ClipData.Item.Builder#setHtmlText(java.lang.String)(https://developer.android.com/reference/java/lang/String htmlText) ` Sets the HTML text for the item to be constructed. |
| ` https://developer.android.com/reference/android/content/ClipData.Item.Builder` | ` https://developer.android.com/reference/android/content/ClipData.Item.Builder#setIntent(android.content.Intent)(https://developer.android.com/reference/android/content/Intent intent) ` Sets the Intent for the item to be constructed. |
| ` https://developer.android.com/reference/android/content/ClipData.Item.Builder` | ` https://developer.android.com/reference/android/content/ClipData.Item.Builder#setIntentSender(android.content.IntentSender)(https://developer.android.com/reference/android/content/IntentSender intentSender) ` Sets the `https://developer.android.com/reference/android/content/IntentSender` for the item to be constructed. |
| ` https://developer.android.com/reference/android/content/ClipData.Item.Builder` | ` https://developer.android.com/reference/android/content/ClipData.Item.Builder#setText(java.lang.CharSequence)(https://developer.android.com/reference/java/lang/CharSequence text) ` Sets the text for the item to be constructed. |
| ` https://developer.android.com/reference/android/content/ClipData.Item.Builder` | ` https://developer.android.com/reference/android/content/ClipData.Item.Builder#setUri(android.net.Uri)(https://developer.android.com/reference/android/net/Uri uri) ` Sets the URI for the item to be constructed. |

### 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

```
public Builder ()
```

<br />

<br />

## Public methods

### build

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

```
public ClipData.Item build ()
```

Constructs a new Item with the properties set on this builder.

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/content/ClipData.Item` | This value cannot be `null`. <br /> |

### setHtmlText

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

```
public ClipData.Item.Builder setHtmlText (String htmlText)
```

Sets the HTML text for the item to be constructed.

<br />

| Parameters ||
|---|---|
| `htmlText` | `String`: This value may be `null`. <br /> |

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/content/ClipData.Item.Builder` | This value cannot be `null`. <br /> |

### setIntent

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

```
public ClipData.Item.Builder setIntent (Intent intent)
```

Sets the Intent for the item to be constructed.

<br />

| Parameters ||
|---|---|
| `intent` | `Intent`: This value may be `null`. <br /> |

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/content/ClipData.Item.Builder` | This value cannot be `null`. <br /> |

### setIntentSender

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

```
public ClipData.Item.Builder setIntentSender (IntentSender intentSender)
```

Sets the `https://developer.android.com/reference/android/content/IntentSender` for the item to be constructed. To prevent receiving apps from improperly manipulating the intent to launch another activity as this caller, the provided IntentSender must be immutable. If there is a fixed lifetime for this ClipData (ie. for drag and drop), the system will cancel the IntentSender when it is no longer used.

<br />

| Parameters ||
|---|---|
| `intentSender` | `IntentSender`: This value may be `null`. <br /> |

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/content/ClipData.Item.Builder` | This value cannot be `null`. <br /> |

### setText

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

```
public ClipData.Item.Builder setText (CharSequence text)
```

Sets the text for the item to be constructed.

<br />

| Parameters ||
|---|---|
| `text` | `CharSequence`: This value may be `null`. <br /> |

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/content/ClipData.Item.Builder` | This value cannot be `null`. <br /> |

### setUri

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

```
public ClipData.Item.Builder setUri (Uri uri)
```

Sets the URI for the item to be constructed.

<br />

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

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/content/ClipData.Item.Builder` | This value cannot be `null`. <br /> |