# InputContentInfoCompat

added in[version 25.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  
belongs to Maven artifact com.android.support:support-compat:28.0.0-alpha1  
Summary:[Ctors](https://developer.android.com/reference/android/support/v13/view/inputmethod/InputContentInfoCompat#pubctors)\|[Methods](https://developer.android.com/reference/android/support/v13/view/inputmethod/InputContentInfoCompat#pubmethods)\|[Inherited Methods](https://developer.android.com/reference/android/support/v13/view/inputmethod/InputContentInfoCompat#inhmethods)\|[\[Expand All\]](https://developer.android.com/reference/android/support/v13/view/inputmethod/InputContentInfoCompat#)  

# InputContentInfoCompat

| This package is part of the Android[support library](https://developer.android.com/topic/libraries/support-library)which is no longer maintained. The support library has been superseded by[AndroidX](https://developer.android.com/jetpack/androidx)which is part of[Jetpack](https://developer.android.com/jetpack). We recommend using the AndroidX libraries in all new projects. You should also consider[migrating](https://developer.android.com/jetpack/androidx/migrate)existing projects to AndroidX. To find the AndroidX class that maps to this deprecated class, see the AndroidX support library[class mappings](https://developer.android.com/jetpack/androidx/migrate/class-mappings).

`
public

final

class
InputContentInfoCompat
`  
`

extends Object


``


`

|---|-------------------------------------------------------------|
| java.lang.Object                                               ||
| ↳ | android.support.v13.view.inputmethod.InputContentInfoCompat |

<br />

*** ** * ** ***

Helper for accessing features in InputContentInfo introduced after API level 13 in a backwards compatible fashion.

## Summary

|                                                                                                                                                                                                                                                                                                                  ### Public constructors                                                                                                                                                                                                                                                                                                                  ||
|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---|
| ` `[InputContentInfoCompat](https://developer.android.com/reference/android/support/v13/view/inputmethod/InputContentInfoCompat#InputContentInfoCompat(android.net.Uri, android.content.ClipDescription, android.net.Uri))`(`[Uri](https://developer.android.com/reference/android/net/Uri.html)` contentUri, `[ClipDescription](https://developer.android.com/reference/android/content/ClipDescription.html)` description, `[Uri](https://developer.android.com/reference/android/net/Uri.html)` linkUri) ` Constructs[InputContentInfoCompat](https://developer.android.com/reference/android/support/v13/view/inputmethod/InputContentInfoCompat). |

|                                                                                                                                                                                        ### Public methods                                                                                                                                                                                         ||
|-----------------------------------------------------------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| ` `[Uri](https://developer.android.com/reference/android/net/Uri.html)                                                                  | ` `[getContentUri](https://developer.android.com/reference/android/support/v13/view/inputmethod/InputContentInfoCompat#getContentUri())`() `                                                                                                             |
| ` `[ClipDescription](https://developer.android.com/reference/android/content/ClipDescription.html)                                      | ` `[getDescription](https://developer.android.com/reference/android/support/v13/view/inputmethod/InputContentInfoCompat#getDescription())`() `                                                                                                           |
| ` `[Uri](https://developer.android.com/reference/android/net/Uri.html)                                                                  | ` `[getLinkUri](https://developer.android.com/reference/android/support/v13/view/inputmethod/InputContentInfoCompat#getLinkUri())`() `                                                                                                                   |
| ` void`                                                                                                                                 | ` `[releasePermission](https://developer.android.com/reference/android/support/v13/view/inputmethod/InputContentInfoCompat#releasePermission())`() ` Releases a temporary read-only access permission for content URI associated with this object.       |
| ` void`                                                                                                                                 | ` `[requestPermission](https://developer.android.com/reference/android/support/v13/view/inputmethod/InputContentInfoCompat#requestPermission())`() ` Requests a temporary read-only access permission for content URI associated with this object.       |
| ` Object`                                                                                                                               | ` `[unwrap](https://developer.android.com/reference/android/support/v13/view/inputmethod/InputContentInfoCompat#unwrap())`() ` Gets the underlying framework android.view.inputmethod.InputContentInfo object.                                           |
| ` static `[InputContentInfoCompat](https://developer.android.com/reference/android/support/v13/view/inputmethod/InputContentInfoCompat) | ` `[wrap](https://developer.android.com/reference/android/support/v13/view/inputmethod/InputContentInfoCompat#wrap(java.lang.Object))`(Object inputContentInfo) ` Creates an instance from a framework android.view.inputmethod.InputContentInfo object. |

| ### Inherited methods |
|-----------------------|---|
| [![](https://developer.android.com/static/assets/images/styles/disclosure_down.png)](https://developer.android.com/reference/android/support/v13/view/inputmethod/InputContentInfoCompat#)From class` java.lang.Object ` |-------------------|-------------------------------| | ` Object`         | ` clone() `                   | | ` boolean`        | ` equals(Object arg0) `       | | ` void`           | ` finalize() `                | | ` final Class<?>` | ` getClass() `                | | ` int`            | ` hashCode() `                | | ` final void`     | ` notify() `                  | | ` final void`     | ` notifyAll() `               | | ` String`         | ` toString() `                | | ` final void`     | ` wait(long arg0, int arg1) ` | | ` final void`     | ` wait(long arg0) `           | | ` final void`     | ` wait() `                    | ||

## Public constructors

### InputContentInfoCompat

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

```
InputContentInfoCompat (Uri contentUri, 
                ClipDescription description, 
                Uri linkUri)
```

Constructs[InputContentInfoCompat](https://developer.android.com/reference/android/support/v13/view/inputmethod/InputContentInfoCompat).

<br />

|                                                                                                                                                                                                                Parameters                                                                                                                                                                                                                ||
|---------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `contentUri`  | `Uri`: content URI to be exported from the input method. This cannot be`null`. <br />                                                                                                                                                                                                                                                                                                                                     |
| `description` | `ClipDescription`: a[ClipDescription](https://developer.android.com/reference/android/content/ClipDescription.html)object that contains the metadata of`contentUri`such as MIME type(s). This object cannot be`null`. Also[getLabel()](https://developer.android.com/reference/android/content/ClipDescription.html#getLabel())should be describing the content specified by`contentUri`for accessibility reasons. <br /> |
| `linkUri`     | `Uri`: an optional`http`or`https`URI. The editor author may provide a way to navigate the user to the specified web page if this is not`null`. <br />                                                                                                                                                                                                                                                                     |

## Public methods

### getContentUri

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

```
Uri getContentUri ()
```

<br />

<br />

|                                                             Returns                                                             ||
|---------------------------------------------------------------------|------------------------------------------------------------|
| [Uri](https://developer.android.com/reference/android/net/Uri.html) | content URI with which the content can be obtained. <br /> |

### getDescription

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

```
ClipDescription getDescription ()
```

<br />

<br />

|                                                                                                                                                                                                            Returns                                                                                                                                                                                                            ||
|-------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [ClipDescription](https://developer.android.com/reference/android/content/ClipDescription.html) | [ClipDescription](https://developer.android.com/reference/android/content/ClipDescription.html)object that contains the metadata of`#getContentUri()`such as MIME type(s).[getLabel()](https://developer.android.com/reference/android/content/ClipDescription.html#getLabel())can be used for accessibility purpose. <br /> |

### getLinkUri

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

```
Uri getLinkUri ()
```

<br />

<br />

|                                                                  Returns                                                                   ||
|---------------------------------------------------------------------|-----------------------------------------------------------------------|
| [Uri](https://developer.android.com/reference/android/net/Uri.html) | an optional`http`or`https`URI that is related to this content. <br /> |

### releasePermission

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

```
void releasePermission ()
```

Releases a temporary read-only access permission for content URI associated with this object.

Does nothing if the temporary permission is not granted.

<br />

<br />

### requestPermission

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

```
void requestPermission ()
```

Requests a temporary read-only access permission for content URI associated with this object.

Does nothing if the temporary permission is already granted.

<br />

<br />

### unwrap

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

```
Object unwrap ()
```

Gets the underlying framework android.view.inputmethod.InputContentInfo object.

This method always returns`null`on API \<= 24.

<br />

<br />

|                                                  Returns                                                   ||
|----------|--------------------------------------------------------------------------------------------------|
| `Object` | an equivalent android.view.inputmethod.InputContentInfo object, or`null`if not supported. <br /> |

### wrap

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

```
InputContentInfoCompat wrap (Object inputContentInfo)
```

Creates an instance from a framework android.view.inputmethod.InputContentInfo object.

This method always returns`null`on API \<= 24.

<br />

<br />

|                                                 Parameters                                                 ||
|--------------------|----------------------------------------------------------------------------------------|
| `inputContentInfo` | `Object`: an android.view.inputmethod.InputContentInfo object, or`null`if none. <br /> |

|                                                                                                                                                      Returns                                                                                                                                                      ||
|-------------------------------------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [InputContentInfoCompat](https://developer.android.com/reference/android/support/v13/view/inputmethod/InputContentInfoCompat) | an equivalent[InputContentInfoCompat](https://developer.android.com/reference/android/support/v13/view/inputmethod/InputContentInfoCompat)object, or`null`if not supported. <br /> |

-

  ## Interfaces

  - [InputConnectionCompat.OnCommitContentListener](https://developer.android.com/reference/android/support/v13/view/inputmethod/InputConnectionCompat.OnCommitContentListener)
-

  ## Classes

  - [EditorInfoCompat](https://developer.android.com/reference/android/support/v13/view/inputmethod/EditorInfoCompat)
  - [InputConnectionCompat](https://developer.android.com/reference/android/support/v13/view/inputmethod/InputConnectionCompat)
  - [InputContentInfoCompat](https://developer.android.com/reference/android/support/v13/view/inputmethod/InputContentInfoCompat)