I have a Chip component, and through its onClick
event, I would like to bring up the keyboard.
Currently, I am using the RemoteInput
API:
val intent: Intent = RemoteInputIntentHelper.createActionRemoteInputIntent()
val remoteInputs: List<RemoteInput> = listOf(
RemoteInput
.Builder(inputTextKey)
.setLabel("Note")
.wearableExtender {
setEmojisAllowed(false)
setInputActionType(EditorInfo.IME_ACTION_DONE)
}
.build()
)
RemoteInputIntentHelper.putRemoteInputsExtra(intent, remoteInputs)
with the Chip component:
Chip(
onClick = { launcher.launch(intent) },
...)
This works fine, however it first brings up a menu to choose the input type: either Voice Input or Keyboard Input (cf. image).
Is there a way to instantly bring up the Keyboard input, without going through this intermediate menu?
I have read most of the documentation for RemoteInput and tried modifying fields through the setters exposed in the API, but none of them seem to impact the input type (aside from setEmojisAllowed
).