[ Web Proxy ]
URL:
Viewing: https://developer.android.com/reference/android/view/inputmethod/ConnectionlessHandwritingCallback [Back]  [Original]

ConnectionlessHandwritingCallback  |  API reference  |  Android Developers Skip to main content
Essentials Design & Plan Develop Google Play Blog
Search:
Android Studio
Android Developers [Android Developers]
Stay organized with collections Save and categorize content based on your preferences.
Added in API level 35

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(View,CursorAnchorInfo,Executor,ConnectionlessHandwritingCallback), or InputMethodManager.startConnectionlessStylusHandwritingForDelegation(View,CursorAnchorInfo,String,Executor,ConnectionlessHandwritingCallback).

Summary

Constants

int CONNECTIONLESS_HANDWRITING_ERROR_NO_TEXT_RECOGNIZED

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

int CONNECTIONLESS_HANDWRITING_ERROR_OTHER

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

int CONNECTIONLESS_HANDWRITING_ERROR_UNSUPPORTED

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

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

Added in API level 35
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

Added in API level 35
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

Added in API level 35
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

Added in API level 35
public abstract void onError (int errorCode)

Callback when the connectionless handwriting session did not complete successfully.

Parameters
errorCode int: Value is one of the following:

onResult

Added in API level 35
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 2026-08-03 UTC.

[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2026-08-03 UTC."],[],[]]

Web Proxy Viewer  |  New URL  |  Original Page