# RemoteInput

# RemoteInput

Artifact:[androidx.core:core](https://developer.android.com/jetpack/androidx/releases/core)  
[View Source](https://cs.android.com/search?q=file:androidx/core/app/RemoteInput.java+class:androidx.core.app.RemoteInput)  
Added in[1.1.0](https://developer.android.com/jetpack/androidx/releases/core#1.1.0)

*** ** * ** ***

Kotlin\|[Java](https://developer.android.com/reference/androidx/core/app/RemoteInput "View this page in Java")

<br />

```
class RemoteInput
```

<br />

*** ** * ** ***

Helper for using the[android.app.RemoteInput](https://developer.android.com/reference/android/app/RemoteInput.html).

## Summary

|                                                                                                                      ### Nested types                                                                                                                      |
|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `class `[RemoteInput.Builder](https://developer.android.com/reference/kotlin/androidx/core/app/RemoteInput.Builder) Builder class for[androidx.core.app.RemoteInput](https://developer.android.com/reference/kotlin/androidx/core/app/RemoteInput)objects. |

|                                        ### Constants                                         |
|----------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `const `[Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)          | [EDIT_CHOICES_BEFORE_SENDING_AUTO](https://developer.android.com/reference/kotlin/androidx/core/app/RemoteInput#EDIT_CHOICES_BEFORE_SENDING_AUTO())` = 0` The platform will determine whether choices will be edited before being sent to the app.                    |
| `const `[Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)          | [EDIT_CHOICES_BEFORE_SENDING_DISABLED](https://developer.android.com/reference/kotlin/androidx/core/app/RemoteInput#EDIT_CHOICES_BEFORE_SENDING_DISABLED())` = 1` Tapping on a choice should send the input immediately, without letting the user edit it.            |
| `const `[Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)          | [EDIT_CHOICES_BEFORE_SENDING_ENABLED](https://developer.android.com/reference/kotlin/androidx/core/app/RemoteInput#EDIT_CHOICES_BEFORE_SENDING_ENABLED())` = 2` Tapping on a choice should let the user edit the input before it is sent to the app.                  |
| `const `[String](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html)`!` | [EXTRA_RESULTS_DATA](https://developer.android.com/reference/kotlin/androidx/core/app/RemoteInput#EXTRA_RESULTS_DATA())` = "android.remoteinput.resultsData"` Extra added to a clip data intent object to hold the text results bundle.                               |
| `const `[String](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html)`!` | [RESULTS_CLIP_LABEL](https://developer.android.com/reference/kotlin/androidx/core/app/RemoteInput#RESULTS_CLIP_LABEL())` = "android.remoteinput.results"` Label used to denote the clip data type used for remote input transport                                     |
| `const `[Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)          | [SOURCE_CHOICE](https://developer.android.com/reference/kotlin/androidx/core/app/RemoteInput#SOURCE_CHOICE())` = 1` The user selected one of the choices from[getChoices](https://developer.android.com/reference/kotlin/androidx/core/app/RemoteInput#getChoices()). |
| `const `[Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)          | [SOURCE_FREE_FORM_INPUT](https://developer.android.com/reference/kotlin/androidx/core/app/RemoteInput#SOURCE_FREE_FORM_INPUT())` = 0` The user manually entered the data.                                                                                             |

|                                                                                                                                                                             ### Public functions                                                                                                                                                                              |
|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `java-static `[Unit](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html)                                                                                                                                                                                                                                                                                   | [addDataResultToIntent](https://developer.android.com/reference/kotlin/androidx/core/app/RemoteInput#addDataResultToIntent(androidx.core.app.RemoteInput,android.content.Intent,java.util.Map<java.lang.String,android.net.Uri>))`(` ` remoteInput: `[RemoteInput](https://developer.android.com/reference/kotlin/androidx/core/app/RemoteInput)`,` ` intent: `[Intent](https://developer.android.com/reference/android/content/Intent.html)`,` ` results: (`[Mutable](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-mutable-map/index.html)`)`[Map](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-map/index.html)`<`[String](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html)`!, `[Uri](https://developer.android.com/reference/android/net/Uri.html)`!>` `)` Same as[addResultsToIntent](https://developer.android.com/reference/kotlin/androidx/core/app/RemoteInput#addResultsToIntent(androidx.core.app.RemoteInput[],android.content.Intent,android.os.Bundle))but for setting data results. |
| `java-static `[Unit](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html)                                                                                                                                                                                                                                                                                   | [addResultsToIntent](https://developer.android.com/reference/kotlin/androidx/core/app/RemoteInput#addResultsToIntent(androidx.core.app.RemoteInput[],android.content.Intent,android.os.Bundle))`(` ` remoteInputs: `[Array](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-array/index.html)`<`[RemoteInput](https://developer.android.com/reference/kotlin/androidx/core/app/RemoteInput)`!>,` ` intent: `[Intent](https://developer.android.com/reference/android/content/Intent.html)`,` ` results: `[Bundle](https://developer.android.com/reference/android/os/Bundle.html) `)` Populate an intent object with the results gathered from remote input.                                                                                                                                                                                                                                                                                                                                                                                                 |
| [Boolean](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html)                                                                                                                                                                                                                                                                                           | [getAllowFreeFormInput](https://developer.android.com/reference/kotlin/androidx/core/app/RemoteInput#getAllowFreeFormInput())`()` Get whether or not users can provide an arbitrary value for input.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               |
| `(`[Mutable](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-mutable-set/index.html)`)`[Set](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-set/index.html)`<`[String](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html)`!>?`                                                                                     | [getAllowedDataTypes](https://developer.android.com/reference/kotlin/androidx/core/app/RemoteInput#getAllowedDataTypes())`()`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      |
| [Array](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-array/index.html)`<`[CharSequence](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-char-sequence/index.html)`!>?`                                                                                                                                                                                         | [getChoices](https://developer.android.com/reference/kotlin/androidx/core/app/RemoteInput#getChoices())`()` Get possible input choices.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            |
| `java-static (`[Mutable](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-mutable-map/index.html)`)`[Map](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-map/index.html)`<`[String](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html)`!, `[Uri](https://developer.android.com/reference/android/net/Uri.html)`!>?` | [getDataResultsFromIntent](https://developer.android.com/reference/kotlin/androidx/core/app/RemoteInput#getDataResultsFromIntent(android.content.Intent,java.lang.String))`(intent: `[Intent](https://developer.android.com/reference/android/content/Intent.html)`, remoteInputResultKey: `[String](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html)`)` Similar as[getResultsFromIntent](https://developer.android.com/reference/kotlin/androidx/core/app/RemoteInput#getResultsFromIntent(android.content.Intent))but retrieves data results for a specific RemoteInput result.                                                                                                                                                                                                                                                                                                                                                                                                                                                          |
| [Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)                                                                                                                                                                                                                                                                                                   | [getEditChoicesBeforeSending](https://developer.android.com/reference/kotlin/androidx/core/app/RemoteInput#getEditChoicesBeforeSending())`()` Gets whether tapping on a choice should let the user edit the input before it is sent to the app.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |
| [Bundle](https://developer.android.com/reference/android/os/Bundle.html)                                                                                                                                                                                                                                                                                                      | [getExtras](https://developer.android.com/reference/kotlin/androidx/core/app/RemoteInput#getExtras())`()` Get additional metadata carried around with this remote input.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           |
| [CharSequence](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-char-sequence/index.html)`?`                                                                                                                                                                                                                                                                             | [getLabel](https://developer.android.com/reference/kotlin/androidx/core/app/RemoteInput#getLabel())`()` Get the label to display to users when collecting this input.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |
| [String](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html)                                                                                                                                                                                                                                                                                             | [getResultKey](https://developer.android.com/reference/kotlin/androidx/core/app/RemoteInput#getResultKey())`()` Get the key that the result of this input will be set in from the Bundle returned by[getResultsFromIntent](https://developer.android.com/reference/kotlin/androidx/core/app/RemoteInput#getResultsFromIntent(android.content.Intent))when the[android.app.PendingIntent](https://developer.android.com/reference/android/app/PendingIntent.html)is sent.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           |
| `java-static `[Bundle](https://developer.android.com/reference/android/os/Bundle.html)`?`                                                                                                                                                                                                                                                                                     | [getResultsFromIntent](https://developer.android.com/reference/kotlin/androidx/core/app/RemoteInput#getResultsFromIntent(android.content.Intent))`(intent: `[Intent](https://developer.android.com/reference/android/content/Intent.html)`)` Get the remote input text results bundle from an intent.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |
| `java-static `[Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)                                                                                                                                                                                                                                                                                     | [getResultsSource](https://developer.android.com/reference/kotlin/androidx/core/app/RemoteInput#getResultsSource(android.content.Intent))`(intent: `[Intent](https://developer.android.com/reference/android/content/Intent.html)`)` Get the source of the RemoteInput results.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |
| [Boolean](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html)                                                                                                                                                                                                                                                                                           | [isDataOnly](https://developer.android.com/reference/kotlin/androidx/core/app/RemoteInput#isDataOnly())`()` Returns true if the input only accepts data, meaning[getAllowFreeFormInput](https://developer.android.com/reference/kotlin/androidx/core/app/RemoteInput#getAllowFreeFormInput())is false,[getChoices](https://developer.android.com/reference/kotlin/androidx/core/app/RemoteInput#getChoices())is null or empty, and[getAllowedDataTypes](https://developer.android.com/reference/kotlin/androidx/core/app/RemoteInput#getAllowedDataTypes())is non-null and not empty.                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |
| `java-static `[Unit](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html)                                                                                                                                                                                                                                                                                   | [setResultsSource](https://developer.android.com/reference/kotlin/androidx/core/app/RemoteInput#setResultsSource(android.content.Intent,int))`(intent: `[Intent](https://developer.android.com/reference/android/content/Intent.html)`, source: `[Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)`)` Set the source of the RemoteInput results.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         |

## Constants

### EDIT_CHOICES_BEFORE_SENDING_AUTO

Added in[1.2.0](https://developer.android.com/jetpack/androidx/releases/core#1.2.0)  

```
const val EDIT_CHOICES_BEFORE_SENDING_AUTO = 0: Int
```

The platform will determine whether choices will be edited before being sent to the app.  

### EDIT_CHOICES_BEFORE_SENDING_DISABLED

Added in[1.2.0](https://developer.android.com/jetpack/androidx/releases/core#1.2.0)  

```
const val EDIT_CHOICES_BEFORE_SENDING_DISABLED = 1: Int
```

Tapping on a choice should send the input immediately, without letting the user edit it.  

### EDIT_CHOICES_BEFORE_SENDING_ENABLED

Added in[1.2.0](https://developer.android.com/jetpack/androidx/releases/core#1.2.0)  

```
const val EDIT_CHOICES_BEFORE_SENDING_ENABLED = 2: Int
```

Tapping on a choice should let the user edit the input before it is sent to the app.  

### EXTRA_RESULTS_DATA

Added in[1.1.0](https://developer.android.com/jetpack/androidx/releases/core#1.1.0)  

```
const val EXTRA_RESULTS_DATA = "android.remoteinput.resultsData": String!
```

Extra added to a clip data intent object to hold the text results bundle.  

### RESULTS_CLIP_LABEL

Added in[1.1.0](https://developer.android.com/jetpack/androidx/releases/core#1.1.0)  

```
const val RESULTS_CLIP_LABEL = "android.remoteinput.results": String!
```

Label used to denote the clip data type used for remote input transport  

### SOURCE_CHOICE

Added in[1.1.0](https://developer.android.com/jetpack/androidx/releases/core#1.1.0)  

```
const val SOURCE_CHOICE = 1: Int
```

The user selected one of the choices from[getChoices](https://developer.android.com/reference/kotlin/androidx/core/app/RemoteInput#getChoices()).  

### SOURCE_FREE_FORM_INPUT

Added in[1.1.0](https://developer.android.com/jetpack/androidx/releases/core#1.1.0)  

```
const val SOURCE_FREE_FORM_INPUT = 0: Int
```

The user manually entered the data.  

## Public functions

### addDataResultToIntent

Added in[1.1.0](https://developer.android.com/jetpack/androidx/releases/core#1.1.0)  

```
java-static fun addDataResultToIntent(
    remoteInput: RemoteInput,
    intent: Intent,
    results: (Mutable)Map<String!, Uri!>
): Unit
```

Same as[addResultsToIntent](https://developer.android.com/reference/kotlin/androidx/core/app/RemoteInput#addResultsToIntent(androidx.core.app.RemoteInput[],android.content.Intent,android.os.Bundle))but for setting data results.  

|                                                                                                                                                                                Parameters                                                                                                                                                                                 |
|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `remoteInput: `[RemoteInput](https://developer.android.com/reference/kotlin/androidx/core/app/RemoteInput)                                                                                                                                                                                                                                                                | The remote input for which results are being provided                                                                                                                                       |
| `intent: `[Intent](https://developer.android.com/reference/android/content/Intent.html)                                                                                                                                                                                                                                                                                   | The intent to add remote input results to. The[ClipData](https://developer.android.com/reference/android/content/ClipData.html)field of the intent will be modified to contain the results. |
| `results: (`[Mutable](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-mutable-map/index.html)`)`[Map](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-map/index.html)`<`[String](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html)`!, `[Uri](https://developer.android.com/reference/android/net/Uri.html)`!>` | A map of mime type to the Uri result for that mime type.                                                                                                                                    |

### addResultsToIntent

Added in[1.1.0](https://developer.android.com/jetpack/androidx/releases/core#1.1.0)  

```
java-static fun addResultsToIntent(
    remoteInputs: Array<RemoteInput!>,
    intent: Intent,
    results: Bundle
): Unit
```

Populate an intent object with the results gathered from remote input. This method should only be called by remote input collection services when sending results to a pending intent.  

|                                                                                            Parameters                                                                                             |
|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `remoteInputs: `[Array](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-array/index.html)`<`[RemoteInput](https://developer.android.com/reference/kotlin/androidx/core/app/RemoteInput)`!>` | The remote inputs for which results are being provided                                                                                                                                               |
| `intent: `[Intent](https://developer.android.com/reference/android/content/Intent.html)                                                                                                           | The intent to add remote inputs to. The[android.content.ClipData](https://developer.android.com/reference/android/content/ClipData.html)field of the intent will be modified to contain the results. |
| `results: `[Bundle](https://developer.android.com/reference/android/os/Bundle.html)                                                                                                               | A bundle holding the remote input results. This bundle should be populated with keys matching the result keys specified in`remoteInputs`with values being the result per key.                        |

### getAllowFreeFormInput

Added in[1.1.0](https://developer.android.com/jetpack/androidx/releases/core#1.1.0)  

```
fun getAllowFreeFormInput(): Boolean
```

Get whether or not users can provide an arbitrary value for input. If you set this to`false`, users must select one of the choices in[getChoices](https://developer.android.com/reference/kotlin/androidx/core/app/RemoteInput#getChoices()). An[IllegalArgumentException](https://developer.android.com/reference/java/lang/IllegalArgumentException.html)is thrown if you set this to false and[getChoices](https://developer.android.com/reference/kotlin/androidx/core/app/RemoteInput#getChoices())returns`null`or empty.  

### getAllowedDataTypes

Added in[1.1.0](https://developer.android.com/jetpack/androidx/releases/core#1.1.0)  

```
fun getAllowedDataTypes(): (Mutable)Set<String!>?
```  

### getChoices

Added in[1.1.0](https://developer.android.com/jetpack/androidx/releases/core#1.1.0)  

```
fun getChoices(): Array<CharSequence!>?
```

Get possible input choices. This can be`null`if there are no choices to present.  

### getDataResultsFromIntent

Added in[1.1.0](https://developer.android.com/jetpack/androidx/releases/core#1.1.0)  

```
java-static fun getDataResultsFromIntent(intent: Intent, remoteInputResultKey: String): (Mutable)Map<String!, Uri!>?
```

Similar as[getResultsFromIntent](https://developer.android.com/reference/kotlin/androidx/core/app/RemoteInput#getResultsFromIntent(android.content.Intent))but retrieves data results for a specific RemoteInput result. To retrieve a value use:  

```kotlin
Map<String, Uri> results =
    RemoteInput.getDataResultsFromIntent(intent, REMOTE_INPUT_KEY);
if (results != null) {
  Uri data = results.get(MIME_TYPE_OF_INTEREST);
}
```  

|                                                Parameters                                                 |
|-----------------------------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------|
| `intent: `[Intent](https://developer.android.com/reference/android/content/Intent.html)                   | The intent object that fired in response to an action or content intent which also had one or more remote input requested. |
| `remoteInputResultKey: `[String](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html) | The result key for the RemoteInput you want results for.                                                                   |

### getEditChoicesBeforeSending

Added in[1.2.0](https://developer.android.com/jetpack/androidx/releases/core#1.2.0)  

```
fun getEditChoicesBeforeSending(): Int
```

Gets whether tapping on a choice should let the user edit the input before it is sent to the app.  

### getExtras

Added in[1.1.0](https://developer.android.com/jetpack/androidx/releases/core#1.1.0)  

```
fun getExtras(): Bundle
```

Get additional metadata carried around with this remote input.  

### getLabel

Added in[1.1.0](https://developer.android.com/jetpack/androidx/releases/core#1.1.0)  

```
fun getLabel(): CharSequence?
```

Get the label to display to users when collecting this input.  

### getResultKey

Added in[1.1.0](https://developer.android.com/jetpack/androidx/releases/core#1.1.0)  

```
fun getResultKey(): String
```

Get the key that the result of this input will be set in from the Bundle returned by[getResultsFromIntent](https://developer.android.com/reference/kotlin/androidx/core/app/RemoteInput#getResultsFromIntent(android.content.Intent))when the[android.app.PendingIntent](https://developer.android.com/reference/android/app/PendingIntent.html)is sent.  

### getResultsFromIntent

Added in[1.1.0](https://developer.android.com/jetpack/androidx/releases/core#1.1.0)  

```
java-static fun getResultsFromIntent(intent: Intent): Bundle?
```

Get the remote input text results bundle from an intent. The returned Bundle will contain a key/value for every result key populated by remote input collector. Use the[getCharSequence](https://developer.android.com/reference/android/os/Bundle.html#getCharSequence(java.lang.String))method to retrieve a value. For data results use[getDataResultsFromIntent](https://developer.android.com/reference/kotlin/androidx/core/app/RemoteInput#getDataResultsFromIntent(android.content.Intent,java.lang.String)).  

|                                       Parameters                                        |
|-----------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------|
| `intent: `[Intent](https://developer.android.com/reference/android/content/Intent.html) | The intent object that fired in response to an action or content intent which also had one or more remote input requested. |

### getResultsSource

Added in[1.1.0](https://developer.android.com/jetpack/androidx/releases/core#1.1.0)  

```
java-static fun getResultsSource(intent: Intent): Int
```

Get the source of the RemoteInput results.  

|                                       Parameters                                        |
|-----------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------|
| `intent: `[Intent](https://developer.android.com/reference/android/content/Intent.html) | The intent object that fired in response to an action or content intent which also had one or more remote input requested. |

|                                   Returns                                   |
|-----------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html) | The source of the results. If no source was set,[SOURCE_FREE_FORM_INPUT](https://developer.android.com/reference/kotlin/androidx/core/app/RemoteInput#SOURCE_FREE_FORM_INPUT())will be returned. |

|                                                            See also                                                             |
|---------------------------------------------------------------------------------------------------------------------------------|---|
| [SOURCE_FREE_FORM_INPUT](https://developer.android.com/reference/kotlin/androidx/core/app/RemoteInput#SOURCE_FREE_FORM_INPUT()) |   |
| [SOURCE_CHOICE](https://developer.android.com/reference/kotlin/androidx/core/app/RemoteInput#SOURCE_CHOICE())                   |   |

### isDataOnly

Added in[1.1.0](https://developer.android.com/jetpack/androidx/releases/core#1.1.0)  

```
fun isDataOnly(): Boolean
```

Returns true if the input only accepts data, meaning[getAllowFreeFormInput](https://developer.android.com/reference/kotlin/androidx/core/app/RemoteInput#getAllowFreeFormInput())is false,[getChoices](https://developer.android.com/reference/kotlin/androidx/core/app/RemoteInput#getChoices())is null or empty, and[getAllowedDataTypes](https://developer.android.com/reference/kotlin/androidx/core/app/RemoteInput#getAllowedDataTypes())is non-null and not empty.  

### setResultsSource

Added in[1.1.0](https://developer.android.com/jetpack/androidx/releases/core#1.1.0)  

```
java-static fun setResultsSource(intent: Intent, source: Int): Unit
```

Set the source of the RemoteInput results. This method should only be called by remote input collection services (e.g.[android.service.notification.NotificationListenerService](https://developer.android.com/reference/android/service/notification/NotificationListenerService.html)) when sending results to a pending intent.  

|                                       Parameters                                        |
|-----------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `intent: `[Intent](https://developer.android.com/reference/android/content/Intent.html) | The intent to add remote input source to. The[ClipData](https://developer.android.com/reference/android/content/ClipData.html)field of the intent will be modified to contain the source. |
| `source: `[Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)   | The source of the results.                                                                                                                                                                |

|                                                            See also                                                             |
|---------------------------------------------------------------------------------------------------------------------------------|---|
| [SOURCE_FREE_FORM_INPUT](https://developer.android.com/reference/kotlin/androidx/core/app/RemoteInput#SOURCE_FREE_FORM_INPUT()) |   |
| [SOURCE_CHOICE](https://developer.android.com/reference/kotlin/androidx/core/app/RemoteInput#SOURCE_CHOICE())                   |   |