# WearableRemoteInputExtender

# WearableRemoteInputExtender

Artifact:[androidx.wear:wear-input](https://developer.android.com/jetpack/androidx/releases/wear)  
[View Source](https://cs.android.com/search?q=file:androidx/wear/input/WearableRemoteInputExtender.kt+class:androidx.wear.input.WearableRemoteInputExtender)  
Added in[1.2.0](https://developer.android.com/jetpack/androidx/releases/wear#1.2.0)

*** ** * ** ***

Kotlin\|[Java](https://developer.android.com/reference/androidx/wear/input/WearableRemoteInputExtender "View this page in Java")

<br />

```
class WearableRemoteInputExtender
```

<br />

*** ** * ** ***

Extender for Wear-specific extras for a[RemoteInput](https://developer.android.com/reference/android/app/RemoteInput.html)instance.

For example, to create a RemoteInput that will allow free form input (e.g. voice input on Wear), but not show the Draw Emoji option:  

```kotlin
import androidx.wear.input.wearableExtender

RemoteInput.Builder("resultKey")
    .setAllowFreeFormInput(true)
    .wearableExtender {
        setEmojisAllowed(false)
        setInputActionType(EditorInfo.IME_ACTION_GO)
    }
    .build()
```

## Summary

|                                                                                                                                             ### Public constructors                                                                                                                                              |
|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [WearableRemoteInputExtender](https://developer.android.com/reference/kotlin/androidx/wear/input/WearableRemoteInputExtender#WearableRemoteInputExtender(android.app.RemoteInput.Builder))`(remoteInput: `[RemoteInput.Builder](https://developer.android.com/reference/android/app/RemoteInput.Builder.html)`)` |

|                                                     ### Public functions                                                      |
|-------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [RemoteInput.Builder](https://developer.android.com/reference/android/app/RemoteInput.Builder.html)                           | [get](https://developer.android.com/reference/kotlin/androidx/wear/input/WearableRemoteInputExtender#get())`()` Returns the[RemoteInput.Builder](https://developer.android.com/reference/android/app/RemoteInput.Builder.html)with set options.                                                                                                                                                                                                               |
| [WearableRemoteInputExtender](https://developer.android.com/reference/kotlin/androidx/wear/input/WearableRemoteInputExtender) | [setEmojisAllowed](https://developer.android.com/reference/kotlin/androidx/wear/input/WearableRemoteInputExtender#setEmojisAllowed(kotlin.Boolean))`(emojisAllowed: `[Boolean](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html)`)` Adding extra to a[RemoteInput](https://developer.android.com/reference/android/app/RemoteInput.html)for allowing or disallowing showing emoji-only options (e.g. the Draw Emoji option).          |
| [WearableRemoteInputExtender](https://developer.android.com/reference/kotlin/androidx/wear/input/WearableRemoteInputExtender) | [setInputActionType](https://developer.android.com/reference/kotlin/androidx/wear/input/WearableRemoteInputExtender#setInputActionType(kotlin.Int))`(imeActionType: `[Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)`)` Adding specified input action type to a[RemoteInput](https://developer.android.com/reference/android/app/RemoteInput.html)to modify the action type of the RemoteInput session (e.g. "send" or "search"). |

## Public constructors

### WearableRemoteInputExtender

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

```
WearableRemoteInputExtender(remoteInput: RemoteInput.Builder)
```  

## Public functions

### get

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

```
fun get(): RemoteInput.Builder
```

Returns the[RemoteInput.Builder](https://developer.android.com/reference/android/app/RemoteInput.Builder.html)with set options.  

### setEmojisAllowed

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

```
fun setEmojisAllowed(emojisAllowed: Boolean): WearableRemoteInputExtender
```

Adding extra to a[RemoteInput](https://developer.android.com/reference/android/app/RemoteInput.html)for allowing or disallowing showing emoji-only options (e.g. the Draw Emoji option).

If set to false, the Draw Emoji option will not be shown. If set to true or not set, the Draw Emoji option will be shown as long as the[RemoteInput](https://developer.android.com/reference/android/app/RemoteInput.html)allows free form input.  

|                                              Parameters                                              |
|------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------|
| `emojisAllowed: `[Boolean](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html) | Whether the emoji-only options is shown. If not set, it will be allowed. |

### setInputActionType

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

```
fun setInputActionType(imeActionType: Int): WearableRemoteInputExtender
```

Adding specified input action type to a[RemoteInput](https://developer.android.com/reference/android/app/RemoteInput.html)to modify the action type of the RemoteInput session (e.g. "send" or "search"). The default action type is "send."  

|                                          Parameters                                          |
|----------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `imeActionType: `[Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html) | Action type to be set on RemoteInput session. Should be one of the following values:[EditorInfo.IME_ACTION_SEND](https://developer.android.com/reference/android/view/inputmethod/EditorInfo.html#IME_ACTION_SEND()),[EditorInfo.IME_ACTION_SEARCH](https://developer.android.com/reference/android/view/inputmethod/EditorInfo.html#IME_ACTION_SEARCH()),[EditorInfo.IME_ACTION_DONE](https://developer.android.com/reference/android/view/inputmethod/EditorInfo.html#IME_ACTION_DONE()),[EditorInfo.IME_ACTION_GO](https://developer.android.com/reference/android/view/inputmethod/EditorInfo.html#IME_ACTION_GO()). If not, send action will be set. |