Added in API level 35

ConnectionlessHandwritingCallback


interface ConnectionlessHandwritingCallback
android.view.inputmethod.ConnectionlessHandwritingCallback

Interface to receive the result of starting a connectionless stylus handwriting session using one of InputMethodManager.startConnectionlessStylusHandwriting(View, CursorAnchorInfo,, android.view.inputmethod.InputMethodManager#startConnectionlessStylusHandwritingForDelegation(android.view.View,android.view.inputmethod.CursorAnchorInfo,java.util.concurrent.Executor,android.view.inputmethod.ConnectionlessHandwritingCallback), or android.view.inputmethod.InputMethodManager#startConnectionlessStylusHandwritingForDelegation(android.view.View,android.view.inputmethod.CursorAnchorInfo,java.lang.String,java.util.concurrent.Executor,android.view.inputmethod.ConnectionlessHandwritingCallback).

Summary

Constants
static Int

Error code indicating that the connectionless handwriting session started and completed but no text was recognized.

static Int

Error code for any other reason that the connectionless handwriting session did not complete successfully.

static Int

Error code indicating that the connectionless handwriting session was not started as the current IME does not support it.

Public methods
abstract Unit
onError(errorCode: Int)

Callback when the connectionless handwriting session did not complete successfully.

abstract Unit

Callback when the connectionless handwriting session completed successfully and recognized text.

Constants

CONNECTIONLESS_HANDWRITING_ERROR_NO_TEXT_RECOGNIZED

Added in API level 35
static val CONNECTIONLESS_HANDWRITING_ERROR_NO_TEXT_RECOGNIZED: Int

Error code indicating that the connectionless handwriting session started and completed but no text was recognized.

Value: 0

CONNECTIONLESS_HANDWRITING_ERROR_OTHER

Added in API level 35
static val CONNECTIONLESS_HANDWRITING_ERROR_OTHER: Int

Error code for any other reason that the connectionless handwriting session did not complete successfully. Either the session could not start, or the session started but did not complete successfully.

Value: 2

CONNECTIONLESS_HANDWRITING_ERROR_UNSUPPORTED

Added in API level 35
static val CONNECTIONLESS_HANDWRITING_ERROR_UNSUPPORTED: Int

Error code indicating that the connectionless handwriting session was not started as the current IME does not support it.

Value: 1

Public methods

onResult

Added in API level 35
abstract fun onResult(text: CharSequence): Unit

Callback when the connectionless handwriting session completed successfully and recognized text.

Parameters
text CharSequence: This value cannot be null.