Stay organized with collections
Save and categorize content based on your preferences.
ConnectionlessHandwritingCallback
public
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,
Executor,ConnectionlessHandwritingCallback)
, InputMethodManager.startConnectionlessStylusHandwritingForDelegation(android.view.View, android.view.inputmethod.CursorAnchorInfo, java.util.concurrent.Executor, android.view.inputmethod.ConnectionlessHandwritingCallback)
, or InputMethodManager.startConnectionlessStylusHandwritingForDelegation(android.view.View, android.view.inputmethod.CursorAnchorInfo, java.lang.String, java.util.concurrent.Executor, android.view.inputmethod.ConnectionlessHandwritingCallback)
.
Summary
Public methods |
abstract
void
|
onError(int errorCode)
Callback when the connectionless handwriting session did not complete successfully.
|
abstract
void
|
onResult(CharSequence text)
Callback when the connectionless handwriting session completed successfully and
recognized text.
|
Constants
CONNECTIONLESS_HANDWRITING_ERROR_NO_TEXT_RECOGNIZED
public static final int CONNECTIONLESS_HANDWRITING_ERROR_NO_TEXT_RECOGNIZED
Error code indicating that the connectionless handwriting session started and completed
but no text was recognized.
Constant Value:
0
(0x00000000)
CONNECTIONLESS_HANDWRITING_ERROR_OTHER
public static final int CONNECTIONLESS_HANDWRITING_ERROR_OTHER
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.
Constant Value:
2
(0x00000002)
CONNECTIONLESS_HANDWRITING_ERROR_UNSUPPORTED
public static final int CONNECTIONLESS_HANDWRITING_ERROR_UNSUPPORTED
Error code indicating that the connectionless handwriting session was not started as the
current IME does not support it.
Constant Value:
1
(0x00000001)
Public methods
onError
public abstract void onError (int errorCode)
Callback when the connectionless handwriting session did not complete successfully.
onResult
public abstract void onResult (CharSequence text)
Callback when the connectionless handwriting session completed successfully and
recognized text.
Parameters |
text |
CharSequence : This value cannot be null . |
Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
Last updated 2025-02-10 UTC.
[null,null,["Last updated 2025-02-10 UTC."],[],[],null,["# ConnectionlessHandwritingCallback\n\nAdded in [API level 35](/guide/topics/manifest/uses-sdk-element#ApiLevels) \n\nConnectionlessHandwritingCallback\n=================================\n\n*** ** * ** ***\n\n[Kotlin](/reference/kotlin/android/view/inputmethod/ConnectionlessHandwritingCallback \"View this page in Kotlin\") \\|Java\n\n\n`\npublic\n\n\ninterface\nConnectionlessHandwritingCallback\n`\n\n\n`\n\n\n`\n\n|------------------------------------------------------------|\n| android.view.inputmethod.ConnectionlessHandwritingCallback |\n\n\u003cbr /\u003e\n\n*** ** * ** ***\n\nInterface to receive the result of starting a connectionless stylus handwriting session using\none of [InputMethodManager.startConnectionlessStylusHandwriting(View, CursorAnchorInfo,\nExecutor,ConnectionlessHandwritingCallback)](/reference/android/view/inputmethod/InputMethodManager#startConnectionlessStylusHandwriting(android.view.View,%20android.view.inputmethod.CursorAnchorInfo,%20java.util.concurrent.Executor,%20android.view.inputmethod.ConnectionlessHandwritingCallback)), [InputMethodManager.startConnectionlessStylusHandwritingForDelegation(android.view.View, android.view.inputmethod.CursorAnchorInfo, java.util.concurrent.Executor, android.view.inputmethod.ConnectionlessHandwritingCallback)](/reference/android/view/inputmethod/InputMethodManager#startConnectionlessStylusHandwritingForDelegation(android.view.View,%20android.view.inputmethod.CursorAnchorInfo,%20java.util.concurrent.Executor,%20android.view.inputmethod.ConnectionlessHandwritingCallback)), or [InputMethodManager.startConnectionlessStylusHandwritingForDelegation(android.view.View, android.view.inputmethod.CursorAnchorInfo, java.lang.String, java.util.concurrent.Executor, android.view.inputmethod.ConnectionlessHandwritingCallback)](/reference/android/view/inputmethod/InputMethodManager#startConnectionlessStylusHandwritingForDelegation(android.view.View,%20android.view.inputmethod.CursorAnchorInfo,%20java.lang.String,%20java.util.concurrent.Executor,%20android.view.inputmethod.ConnectionlessHandwritingCallback)).\n\nSummary\n-------\n\n| ### Constants ||\n|-------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `int` | [CONNECTIONLESS_HANDWRITING_ERROR_NO_TEXT_RECOGNIZED](/reference/android/view/inputmethod/ConnectionlessHandwritingCallback#CONNECTIONLESS_HANDWRITING_ERROR_NO_TEXT_RECOGNIZED) Error code indicating that the connectionless handwriting session started and completed but no text was recognized. |\n| `int` | [CONNECTIONLESS_HANDWRITING_ERROR_OTHER](/reference/android/view/inputmethod/ConnectionlessHandwritingCallback#CONNECTIONLESS_HANDWRITING_ERROR_OTHER) Error code for any other reason that the connectionless handwriting session did not complete successfully. |\n| `int` | [CONNECTIONLESS_HANDWRITING_ERROR_UNSUPPORTED](/reference/android/view/inputmethod/ConnectionlessHandwritingCallback#CONNECTIONLESS_HANDWRITING_ERROR_UNSUPPORTED) Error code indicating that the connectionless handwriting session was not started as the current IME does not support it. |\n\n| ### Public methods ||\n|------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| ` abstract void` | ` `[onError](/reference/android/view/inputmethod/ConnectionlessHandwritingCallback#onError(int))`(int errorCode) ` Callback when the connectionless handwriting session did not complete successfully. |\n| ` abstract void` | ` `[onResult](/reference/android/view/inputmethod/ConnectionlessHandwritingCallback#onResult(java.lang.CharSequence))`(`[CharSequence](/reference/java/lang/CharSequence)` text) ` Callback when the connectionless handwriting session completed successfully and recognized text. |\n\nConstants\n---------\n\n### CONNECTIONLESS_HANDWRITING_ERROR_NO_TEXT_RECOGNIZED\n\nAdded in [API level 35](/guide/topics/manifest/uses-sdk-element#ApiLevels) \n\n```\npublic static final int CONNECTIONLESS_HANDWRITING_ERROR_NO_TEXT_RECOGNIZED\n```\n\nError code indicating that the connectionless handwriting session started and completed\nbut no text was recognized.\n\n\u003cbr /\u003e\n\nConstant Value:\n\n0\n(0x00000000)\n\n\n### CONNECTIONLESS_HANDWRITING_ERROR_OTHER\n\nAdded in [API level 35](/guide/topics/manifest/uses-sdk-element#ApiLevels) \n\n```\npublic static final int CONNECTIONLESS_HANDWRITING_ERROR_OTHER\n```\n\nError code for any other reason that the connectionless handwriting session did not complete\nsuccessfully. Either the session could not start, or the session started but did not complete\nsuccessfully.\n\n\u003cbr /\u003e\n\nConstant Value:\n\n2\n(0x00000002)\n\n\n### CONNECTIONLESS_HANDWRITING_ERROR_UNSUPPORTED\n\nAdded in [API level 35](/guide/topics/manifest/uses-sdk-element#ApiLevels) \n\n```\npublic static final int CONNECTIONLESS_HANDWRITING_ERROR_UNSUPPORTED\n```\n\nError code indicating that the connectionless handwriting session was not started as the\ncurrent IME does not support it.\n\n\u003cbr /\u003e\n\nConstant Value:\n\n1\n(0x00000001)\n\n\nPublic methods\n--------------\n\n### onError\n\nAdded in [API level 35](/guide/topics/manifest/uses-sdk-element#ApiLevels) \n\n```\npublic abstract void onError (int errorCode)\n```\n\nCallback when the connectionless handwriting session did not complete successfully.\n\n\u003cbr /\u003e\n\n| Parameters ||\n|-------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `errorCode` | `int`: Value is [CONNECTIONLESS_HANDWRITING_ERROR_NO_TEXT_RECOGNIZED](/reference/android/view/inputmethod/ConnectionlessHandwritingCallback#CONNECTIONLESS_HANDWRITING_ERROR_NO_TEXT_RECOGNIZED), [CONNECTIONLESS_HANDWRITING_ERROR_UNSUPPORTED](/reference/android/view/inputmethod/ConnectionlessHandwritingCallback#CONNECTIONLESS_HANDWRITING_ERROR_UNSUPPORTED), or [CONNECTIONLESS_HANDWRITING_ERROR_OTHER](/reference/android/view/inputmethod/ConnectionlessHandwritingCallback#CONNECTIONLESS_HANDWRITING_ERROR_OTHER) \u003cbr /\u003e |\n\n### onResult\n\nAdded in [API level 35](/guide/topics/manifest/uses-sdk-element#ApiLevels) \n\n```\npublic abstract void onResult (CharSequence text)\n```\n\nCallback when the connectionless handwriting session completed successfully and\nrecognized text.\n\n\u003cbr /\u003e\n\n| Parameters ||\n|--------|-----------------------------------------------------|\n| `text` | `CharSequence`: This value cannot be `null`. \u003cbr /\u003e |"]]