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 |
Callback when the connectionless handwriting session did not complete successfully. |
abstract Unit |
onResult(text: CharSequence) Callback when the connectionless handwriting session completed successfully and recognized text. |
Constants
CONNECTIONLESS_HANDWRITING_ERROR_NO_TEXT_RECOGNIZED
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
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
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
onError
abstract fun onError(errorCode: Int): Unit
Callback when the connectionless handwriting session did not complete successfully.
onResult
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 . |