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(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

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 CONNECTIONLESS_HANDWRITING_ERROR_NO_TEXT_RECOGNIZED, CONNECTIONLESS_HANDWRITING_ERROR_UNSUPPORTED, or CONNECTIONLESS_HANDWRITING_ERROR_OTHER

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.