Added in [API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels) Summary: [Constants](https://developer.android.com/reference/android/content/ClipDescription#constants) \| [Inherited Constants](https://developer.android.com/reference/android/content/ClipDescription#inhconstants) \| [Fields](https://developer.android.com/reference/android/content/ClipDescription#lfields) \| [Ctors](https://developer.android.com/reference/android/content/ClipDescription#pubctors) \| [Methods](https://developer.android.com/reference/android/content/ClipDescription#pubmethods) \| [Inherited Methods](https://developer.android.com/reference/android/content/ClipDescription#inhmethods)

# ClipDescription

*** ** * ** ***


`
public


class
ClipDescription
`


`

extends https://developer.android.com/reference/java/lang/Object


`

`


implements

https://developer.android.com/reference/android/os/Parcelable


`

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

<br />

*** ** * ** ***

Meta-data describing the contents of a `https://developer.android.com/reference/android/content/ClipData`. Provides enough
information to know if you can handle the ClipData, but not the data
itself.

### Developer Guides

For more information about using the clipboard framework, read the
[Copy and Paste](https://developer.android.com/guide/topics/clipboard/copy-paste)
developer guide.

<br />

## Summary

| ### Constants ||
|---|---|
| `int` | `https://developer.android.com/reference/android/content/ClipDescription#CLASSIFICATION_COMPLETE` Value returned by `https://developer.android.com/reference/android/content/ClipDescription#getConfidenceScore(java.lang.String)` if text classification has been completed. |
| `int` | `https://developer.android.com/reference/android/content/ClipDescription#CLASSIFICATION_NOT_COMPLETE` Value returned by `https://developer.android.com/reference/android/content/ClipDescription#getConfidenceScore(java.lang.String)` if text classification has not been completed on the associated clip. |
| `int` | `https://developer.android.com/reference/android/content/ClipDescription#CLASSIFICATION_NOT_PERFORMED` Value returned by `https://developer.android.com/reference/android/content/ClipDescription#getConfidenceScore(java.lang.String)` if text classification was not and will not be performed on the associated clip. |
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/content/ClipDescription#EXTRA_IS_REMOTE_DEVICE` Indicates that a ClipData's source is a remote device. |
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/content/ClipDescription#EXTRA_IS_SENSITIVE` Indicates that a ClipData contains potentially sensitive information, such as a password or credit card number. |
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/content/ClipDescription#MIMETYPE_TEXT_HTML` The MIME type for a clip holding HTML text. |
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/content/ClipDescription#MIMETYPE_TEXT_INTENT` The MIME type for a clip holding an Intent. |
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/content/ClipDescription#MIMETYPE_TEXT_PLAIN` The MIME type for a clip holding plain text. |
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/content/ClipDescription#MIMETYPE_TEXT_URILIST` The MIME type for a clip holding one or more URIs. |
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/content/ClipDescription#MIMETYPE_UNKNOWN` The MIME type for data whose type is otherwise unknown. |

### Inherited constants

From interface `https://developer.android.com/reference/android/os/Parcelable` `int` `https://developer.android.com/reference/android/os/Parcelable#CONTENTS_FILE_DESCRIPTOR`

Descriptor bit used with `https://developer.android.com/reference/android/os/Parcelable#describeContents()`: indicates that
the Parcelable object's flattened representation includes a file descriptor.


`int` `https://developer.android.com/reference/android/os/Parcelable#PARCELABLE_WRITE_RETURN_VALUE`

Flag for use with `https://developer.android.com/reference/android/os/Parcelable#writeToParcel(android.os.Parcel,%20int)`: the object being written
is a return value, that is the result of a function such as
"`Parcelable someFunction()`",
"`void someFunction(out Parcelable)`", or
"`void someFunction(inout Parcelable)`".


| ### Fields ||
|---|---|
| ` public static final https://developer.android.com/reference/android/os/Parcelable.Creator<https://developer.android.com/reference/android/content/ClipDescription>` | `https://developer.android.com/reference/android/content/ClipDescription#CREATOR` |

| ### Public constructors ||
|---|---|
| ` https://developer.android.com/reference/android/content/ClipDescription#ClipDescription(android.content.ClipDescription)(https://developer.android.com/reference/android/content/ClipDescription o) ` Create a copy of a ClipDescription. |
| ` https://developer.android.com/reference/android/content/ClipDescription#ClipDescription(java.lang.CharSequence,%20java.lang.String[])(https://developer.android.com/reference/java/lang/CharSequence label, https://developer.android.com/reference/java/lang/String mimeTypes) ` Create a new clip. |

| ### Public methods ||
|---|---|
| ` static boolean` | ` https://developer.android.com/reference/android/content/ClipDescription#compareMimeTypes(java.lang.String,%20java.lang.String)(https://developer.android.com/reference/java/lang/String concreteType, https://developer.android.com/reference/java/lang/String desiredType) ` Helper to compare two MIME types, where one may be a pattern. |
| ` int` | ` https://developer.android.com/reference/android/content/ClipDescription#describeContents()() ` Describe the kinds of special objects contained in this Parcelable instance's marshaled representation. |
| ` https://developer.android.com/reference/java/lang/String` | ` https://developer.android.com/reference/android/content/ClipDescription#filterMimeTypes(java.lang.String)(https://developer.android.com/reference/java/lang/String mimeType) ` Filter the clip description MIME types by the given MIME type. |
| ` int` | ` https://developer.android.com/reference/android/content/ClipDescription#getClassificationStatus()() ` Returns `https://developer.android.com/reference/android/content/ClipDescription#CLASSIFICATION_COMPLETE` if text classification has been performed on the associated `https://developer.android.com/reference/android/content/ClipData`. |
| ` float` | ` https://developer.android.com/reference/android/content/ClipDescription#getConfidenceScore(java.lang.String)(https://developer.android.com/reference/java/lang/String entity) ` Returns a score indicating confidence that an instance of the given entity is present in the first item of the clip data, if that item is plain text and text classification has been performed. |
| ` https://developer.android.com/reference/android/os/PersistableBundle` | ` https://developer.android.com/reference/android/content/ClipDescription#getExtras()() ` Retrieve extended data from the clip description. |
| ` https://developer.android.com/reference/java/lang/CharSequence` | ` https://developer.android.com/reference/android/content/ClipDescription#getLabel()() ` Return the label for this clip. |
| ` https://developer.android.com/reference/java/lang/String` | ` https://developer.android.com/reference/android/content/ClipDescription#getMimeType(int)(int index) ` Return one of the possible clip MIME types. |
| ` int` | ` https://developer.android.com/reference/android/content/ClipDescription#getMimeTypeCount()() ` Return the number of MIME types the clip is available in. |
| ` https://developer.android.com/reference/java/lang/String` | ` https://developer.android.com/reference/android/content/ClipDescription#getSourceDeviceName()() ` Returns the name of the source device where the clip originated from. |
| ` long` | ` https://developer.android.com/reference/android/content/ClipDescription#getTimestamp()() ` Return the timestamp at which the associated `https://developer.android.com/reference/android/content/ClipData` is copied to global clipboard in the `https://developer.android.com/reference/java/lang/System#currentTimeMillis()` time base. |
| ` boolean` | ` https://developer.android.com/reference/android/content/ClipDescription#hasMimeType(java.lang.String)(https://developer.android.com/reference/java/lang/String mimeType) ` Check whether the clip description contains the given MIME type. |
| ` boolean` | ` https://developer.android.com/reference/android/content/ClipDescription#isExcludedFromRemoteClipboard()() ` Returns true if this ClipData should be excluded from remote clipboard syncing. |
| ` boolean` | ` https://developer.android.com/reference/android/content/ClipDescription#isRemoteClipboard()() ` Returns true if this ClipData was set by a remote clipboard. |
| ` boolean` | ` https://developer.android.com/reference/android/content/ClipDescription#isStyledText()() ` Returns true if the first item of the associated `https://developer.android.com/reference/android/content/ClipData` contains styled text, i.e. |
| ` void` | ` https://developer.android.com/reference/android/content/ClipDescription#setExcludedFromRemoteClipboard(boolean)(boolean excludeFromRemoteClipboard) ` Sets whether this ClipData should be excluded from remote clipboard syncing. |
| ` void` | ` https://developer.android.com/reference/android/content/ClipDescription#setExtras(android.os.PersistableBundle)(https://developer.android.com/reference/android/os/PersistableBundle extras) ` Add extended data to the clip description. |
| ` https://developer.android.com/reference/java/lang/String` | ` https://developer.android.com/reference/android/content/ClipDescription#toString()() ` Returns a string representation of the object. |
| ` void` | ` https://developer.android.com/reference/android/content/ClipDescription#writeToParcel(android.os.Parcel,%20int)(https://developer.android.com/reference/android/os/Parcel dest, int flags) ` Flatten this object in to a Parcel. |

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


From interface `

https://developer.android.com/reference/android/os/Parcelable

` `
abstract


int` `
https://developer.android.com/reference/android/os/Parcelable#describeContents()()
`

Describe the kinds of special objects contained in this Parcelable
instance's marshaled representation.


`
abstract


void` `
https://developer.android.com/reference/android/os/Parcelable#writeToParcel(android.os.Parcel,%20int)(https://developer.android.com/reference/android/os/Parcel dest, int flags)
`

Flatten this object in to a Parcel.


## Constants

### CLASSIFICATION_COMPLETE

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

```
public static final int CLASSIFICATION_COMPLETE
```

Value returned by `https://developer.android.com/reference/android/content/ClipDescription#getConfidenceScore(java.lang.String)` if text classification has been
completed.

<br />

Constant Value:

3
(0x00000003)


### CLASSIFICATION_NOT_COMPLETE

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

```
public static final int CLASSIFICATION_NOT_COMPLETE
```

Value returned by `https://developer.android.com/reference/android/content/ClipDescription#getConfidenceScore(java.lang.String)` if text classification has not been
completed on the associated clip. This will be always be the case if the clip has not been
copied to clipboard, or if there is no associated clip.

<br />

Constant Value:

1
(0x00000001)


### CLASSIFICATION_NOT_PERFORMED

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

```
public static final int CLASSIFICATION_NOT_PERFORMED
```

Value returned by `https://developer.android.com/reference/android/content/ClipDescription#getConfidenceScore(java.lang.String)` if text classification was not and will
not be performed on the associated clip. This may be the case if the clip does not contain
text in its first item, or if the text is too long.

<br />

Constant Value:

2
(0x00000002)


### EXTRA_IS_REMOTE_DEVICE

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

```
public static final String EXTRA_IS_REMOTE_DEVICE
```

Indicates that a ClipData's source is a remote device.


Type: boolean


This extra can be used to indicate that a ClipData comes from a separate device rather
than being local. It is a rendering hint that can be used to take different behavior
based on the source device of copied data.

<br />

Constant Value:

"android.content.extra.IS_REMOTE_DEVICE"


### EXTRA_IS_SENSITIVE

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

```
public static final String EXTRA_IS_SENSITIVE
```

Indicates that a ClipData contains potentially sensitive information, such as a
password or credit card number.


Type: boolean


This extra can be used to indicate that a ClipData contains sensitive information that
should be redacted or hidden from view until a user takes explicit action to reveal it
(e.g., by pasting).


Adding this extra does not change clipboard behavior or add additional security to
the ClipData. Its purpose is essentially a rendering hint from the source application,
asking that the data within be obfuscated or redacted, unless the user has taken action
to make it visible.

<br />

Constant Value:

"android.content.extra.IS_SENSITIVE"


### MIMETYPE_TEXT_HTML

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

```
public static final String MIMETYPE_TEXT_HTML
```

The MIME type for a clip holding HTML text.

<br />

Constant Value:

"text/html"


### MIMETYPE_TEXT_INTENT

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

```
public static final String MIMETYPE_TEXT_INTENT
```

The MIME type for a clip holding an Intent.

<br />

Constant Value:

"text/vnd.android.intent"


### MIMETYPE_TEXT_PLAIN

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

```
public static final String MIMETYPE_TEXT_PLAIN
```

The MIME type for a clip holding plain text.

<br />

Constant Value:

"text/plain"


### MIMETYPE_TEXT_URILIST

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

```
public static final String MIMETYPE_TEXT_URILIST
```

The MIME type for a clip holding one or more URIs. This should be
used for URIs that are meaningful to a user (such as an http: URI).
It should *not* be used for a content: URI that references some
other piece of data; in that case the MIME type should be the type
of the referenced data.

<br />

Constant Value:

"text/uri-list"


### MIMETYPE_UNKNOWN

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

```
public static final String MIMETYPE_UNKNOWN
```

The MIME type for data whose type is otherwise unknown.


Per RFC 2046, the "application" media type is to be used for discrete
data which do not fit in any of the other categories, and the
"octet-stream" subtype is used to indicate that a body contains arbitrary
binary data.

<br />

Constant Value:

"application/octet-stream"


## Fields

### CREATOR

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

```
public static final Creator<ClipDescription> CREATOR
```

<br />

<br />

## Public constructors

### ClipDescription

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

```
public ClipDescription (ClipDescription o)
```

Create a copy of a ClipDescription.

<br />

| Parameters ||
|---|---|
| `o` | `ClipDescription` <br /> |

### ClipDescription

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

```
public ClipDescription (CharSequence label, 
                String[] mimeTypes)
```

Create a new clip.

<br />

| Parameters ||
|---|---|
| `label` | `CharSequence`: Label to show to the user describing this clip. <br /> |
| `mimeTypes` | `String`: An array of MIME types this data is available as. <br /> |

## Public methods

### compareMimeTypes

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

```
public static boolean compareMimeTypes (String concreteType, 
                String desiredType)
```

Helper to compare two MIME types, where one may be a pattern.

<br />

| Parameters ||
|---|---|
| `concreteType` | `String`: A fully-specified MIME type. <br /> |
| `desiredType` | `String`: A desired MIME type that may be a pattern such as \*/\*. <br /> |

| Returns ||
|---|---|
| `boolean` | Returns true if the two MIME types match. <br /> |

### describeContents

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

```
public int describeContents ()
```

Describe the kinds of special objects contained in this Parcelable
instance's marshaled representation. For example, if the object will
include a file descriptor in the output of `https://developer.android.com/reference/android/os/Parcelable#writeToParcel(android.os.Parcel,%20int)`,
the return value of this method must include the
`https://developer.android.com/reference/android/os/Parcelable#CONTENTS_FILE_DESCRIPTOR` bit.

<br />

| Returns ||
|---|---|
| `int` | a bitmask indicating the set of special object types marshaled by this Parcelable object instance. Value is either `0` or - `https://developer.android.com/reference/android/os/Parcelable#CONTENTS_FILE_DESCRIPTOR` |

### filterMimeTypes

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

```
public String[] filterMimeTypes (String mimeType)
```

Filter the clip description MIME types by the given MIME type. Returns
all MIME types in the clip that match the given MIME type.

<br />

| Parameters ||
|---|---|
| `mimeType` | `String`: The desired MIME type. May be a pattern. <br /> |

| Returns ||
|---|---|
| `https://developer.android.com/reference/java/lang/String` | Returns an array of all matching MIME types. If there are no matching MIME types, null is returned. <br /> |

### getClassificationStatus

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

```
public int getClassificationStatus ()
```

Returns `https://developer.android.com/reference/android/content/ClipDescription#CLASSIFICATION_COMPLETE` if text classification has been performed on the
associated `https://developer.android.com/reference/android/content/ClipData`. If this is the case then `https://developer.android.com/reference/android/content/ClipDescription#getConfidenceScore(java.lang.String)` may be used
to retrieve information about entities within the text. Otherwise, returns
`https://developer.android.com/reference/android/content/ClipDescription#CLASSIFICATION_NOT_COMPLETE` if classification has not yet returned results, or
`https://developer.android.com/reference/android/content/ClipDescription#CLASSIFICATION_NOT_PERFORMED` if classification was not attempted (e.g. because the
text was too long).

<br />

| Returns ||
|---|---|
| `int` | Value is one of the following: - `https://developer.android.com/reference/android/content/ClipDescription#CLASSIFICATION_NOT_COMPLETE` - `https://developer.android.com/reference/android/content/ClipDescription#CLASSIFICATION_NOT_PERFORMED` - `https://developer.android.com/reference/android/content/ClipDescription#CLASSIFICATION_COMPLETE` |

### getConfidenceScore

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

```
public float getConfidenceScore (String entity)
```

Returns a score indicating confidence that an instance of the given entity is present in the
first item of the clip data, if that item is plain text and text classification has been
performed. The value ranges from 0 (low confidence) to 1 (high confidence). 0 indicates that
the entity was not found in the classified text.

Entities should be as defined in the `https://developer.android.com/reference/android/view/textclassifier/TextClassifier` class, such as
`https://developer.android.com/reference/android/view/textclassifier/TextClassifier#TYPE_ADDRESS`, `https://developer.android.com/reference/android/view/textclassifier/TextClassifier#TYPE_URL`, or
`https://developer.android.com/reference/android/view/textclassifier/TextClassifier#TYPE_EMAIL`.

If the result is positive for any entity, the full classification result as a
`https://developer.android.com/reference/android/view/textclassifier/TextLinks` object may be obtained using the `https://developer.android.com/reference/android/content/ClipData.Item#getTextLinks()`
method.

<br />

| Parameters ||
|---|---|
| `entity` | `String`: This value cannot be `null`. Value is one of the following: - `https://developer.android.com/reference/android/view/textclassifier/TextClassifier#TYPE_UNKNOWN` - `https://developer.android.com/reference/android/view/textclassifier/TextClassifier#TYPE_OTHER` - `https://developer.android.com/reference/android/view/textclassifier/TextClassifier#TYPE_EMAIL` - `https://developer.android.com/reference/android/view/textclassifier/TextClassifier#TYPE_PHONE` - `https://developer.android.com/reference/android/view/textclassifier/TextClassifier#TYPE_ADDRESS` - `https://developer.android.com/reference/android/view/textclassifier/TextClassifier#TYPE_URL` - `https://developer.android.com/reference/android/view/textclassifier/TextClassifier#TYPE_DATE` - `https://developer.android.com/reference/android/view/textclassifier/TextClassifier#TYPE_DATE_TIME` - `https://developer.android.com/reference/android/view/textclassifier/TextClassifier#TYPE_FLIGHT_NUMBER` - `https://developer.android.com/reference/android/view/textclassifier/TextClassifier#TYPE_OTP` - `https://developer.android.com/reference/android/view/textclassifier/TextClassifier#TYPE_SMS_RETRIEVER_OTP` - `https://developer.android.com/reference/android/view/textclassifier/TextClassifier#TYPE_SMS_WEB_OTP` |

| Returns ||
|---|---|
| `float` | Value is between 0.0f and 1.0f inclusive <br /> |

| Throws ||
|---|---|
| `https://developer.android.com/reference/java/lang/IllegalStateException` | if `https://developer.android.com/reference/android/content/ClipDescription#getClassificationStatus()` is not `https://developer.android.com/reference/android/content/ClipDescription#CLASSIFICATION_COMPLETE` |

### getExtras

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

```
public PersistableBundle getExtras ()
```

Retrieve extended data from the clip description.

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/os/PersistableBundle` | the bundle containing extended data previously set with `https://developer.android.com/reference/android/content/ClipDescription#setExtras(android.os.PersistableBundle)`, or null if no extras have been set. <br /> |

**See also:**

- `https://developer.android.com/reference/android/content/ClipDescription#setExtras(android.os.PersistableBundle)`

### getLabel

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

```
public CharSequence getLabel ()
```

Return the label for this clip.

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/java/lang/CharSequence` | <br /> |

### getMimeType

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

```
public String getMimeType (int index)
```

Return one of the possible clip MIME types.

<br />

| Parameters ||
|---|---|
| `index` | `int` <br /> |

| Returns ||
|---|---|
| `https://developer.android.com/reference/java/lang/String` | <br /> |

### getMimeTypeCount

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

```
public int getMimeTypeCount ()
```

Return the number of MIME types the clip is available in.

<br />

| Returns ||
|---|---|
| `int` | <br /> |

### getSourceDeviceName

Added in [version 37.2](https://developer.android.com/topic/libraries/support-library/revisions)

```
public String getSourceDeviceName ()
```

Returns the name of the source device where the clip originated from.

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/java/lang/String` | This value may be `null`. <br /> |

### getTimestamp

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

```
public long getTimestamp ()
```

Return the timestamp at which the associated `https://developer.android.com/reference/android/content/ClipData` is copied to global clipboard
in the `https://developer.android.com/reference/java/lang/System#currentTimeMillis()` time base.

<br />

| Returns ||
|---|---|
| `long` | timestamp at which the associated `https://developer.android.com/reference/android/content/ClipData` is copied to global clipboard or `0` if it is not copied to clipboard. <br /> |

### hasMimeType

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

```
public boolean hasMimeType (String mimeType)
```

Check whether the clip description contains the given MIME type.

<br />

| Parameters ||
|---|---|
| `mimeType` | `String`: The desired MIME type. May be a pattern. <br /> |

| Returns ||
|---|---|
| `boolean` | Returns true if one of the MIME types in the clip description matches the desired MIME type, else false. <br /> |

### isExcludedFromRemoteClipboard

Added in [version 37.2](https://developer.android.com/topic/libraries/support-library/revisions)

```
public boolean isExcludedFromRemoteClipboard ()
```

Returns true if this ClipData should be excluded from remote clipboard syncing.

<br />

| Returns ||
|---|---|
| `boolean` | <br /> |

### isRemoteClipboard

Added in [version 37.2](https://developer.android.com/topic/libraries/support-library/revisions)

```
public boolean isRemoteClipboard ()
```

Returns true if this ClipData was set by a remote clipboard.

<br />

| Returns ||
|---|---|
| `boolean` | <br /> |

### isStyledText

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

```
public boolean isStyledText ()
```

Returns true if the first item of the associated `https://developer.android.com/reference/android/content/ClipData` contains styled text, i.e.
if it contains spans such as `https://developer.android.com/reference/android/text/style/CharacterStyle`, `https://developer.android.com/reference/android/text/style/ParagraphStyle`, or `https://developer.android.com/reference/android/text/style/UpdateAppearance`. Returns false if it does not, or if
there is no associated clip data.

<br />

| Returns ||
|---|---|
| `boolean` | <br /> |

### setExcludedFromRemoteClipboard

Added in [version 37.2](https://developer.android.com/topic/libraries/support-library/revisions)

```
public void setExcludedFromRemoteClipboard (boolean excludeFromRemoteClipboard)
```

Sets whether this ClipData should be excluded from remote clipboard syncing.

<br />

| Parameters ||
|---|---|
| `excludeFromRemoteClipboard` | `boolean` <br /> |

### setExtras

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

```
public void setExtras (PersistableBundle extras)
```

Add extended data to the clip description.

<br />

| Parameters ||
|---|---|
| `extras` | `PersistableBundle` <br /> |

**See also:**

- `https://developer.android.com/reference/android/content/ClipDescription#getExtras()`

### toString

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

```
public String toString ()
```

Returns a string representation of the object.

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/java/lang/String` | a string representation of the object. <br /> |

### writeToParcel

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

```
public void writeToParcel (Parcel dest, 
                int flags)
```

Flatten this object in to a Parcel.

<br />

| Parameters ||
|---|---|
| `dest` | `Parcel`: The Parcel in which the object should be written. This value cannot be `null`. <br /> |
| `flags` | `int`: Additional flags about how the object should be written. May be 0 or `https://developer.android.com/reference/android/os/Parcelable#PARCELABLE_WRITE_RETURN_VALUE`. Value is either `0` or a combination of the following: - `https://developer.android.com/reference/android/os/Parcelable#PARCELABLE_WRITE_RETURN_VALUE` |