Added in API level 33

InputMethod.AccessibilityInputConnection


public final class InputMethod.AccessibilityInputConnection
extends Object

java.lang.Object
   ↳ android.accessibilityservice.InputMethod.AccessibilityInputConnection


This class provides the allowed list of InputConnection APIs for accessibility services.

Summary

Public methods

void clearMetaKeyStates(int states)

Clear the given meta key pressed states in the given input connection.

void commitText(CharSequence text, int newCursorPosition, TextAttribute textAttribute)

Commit text to the text box and set the new cursor position.

void deleteSurroundingText(int beforeLength, int afterLength)

Delete beforeLength characters of text before the current cursor position, and delete afterLength characters of text after the current cursor position, excluding the selection.

int getCursorCapsMode(int reqModes)

Retrieve the current capitalization mode in effect at the current cursor position in the text.

SurroundingText getSurroundingText(int beforeLength, int afterLength, int flags)

Gets the surrounding text around the current cursor, with beforeLength characters of text before the cursor (start of the selection), afterLength characters of text after the cursor (end of the selection), and all of the selected text.

void performContextMenuAction(int id)

Perform a context menu action on the field.

void performEditorAction(int editorAction)

Have the editor perform an action it has said it can do.

void sendKeyEvent(KeyEvent event)

Send a key event to the process that is currently attached through this input connection.

void setSelection(int start, int end)

Set the selection of the text editor.

Inherited methods