AbstractInputMethodService.AbstractInputMethodImpl


public abstract class AbstractInputMethodService.AbstractInputMethodImpl
extends Object implements InputMethod

java.lang.Object
   ↳ android.inputmethodservice.AbstractInputMethodService.AbstractInputMethodImpl
InputMethodService.InputMethodImpl Concrete implementation of AbstractInputMethodService.AbstractInputMethodImpl that provides all of the standard behavior for an input method. 


Base class for derived classes to implement their InputMethod interface. This takes care of basic maintenance of the input method, but most behavior must be implemented in a derived class.

Summary

Inherited constants

String SERVICE_INTERFACE

This is the interface name that a service implementing an input method should say that it supports -- that is, this is the action it uses for its intent filter.

String SERVICE_META_DATA

Name under which an InputMethod service component publishes information about itself.

int SHOW_EXPLICIT

Flag for showSoftInput(int, ResultReceiver): this show has been explicitly requested by the user.

int SHOW_FORCED

This constant was deprecated in API level 35. InputMethodManager.SHOW_FORCED is deprecated and should no longer be used by apps. IMEs likewise should no longer react to this flag.

Public constructors

AbstractInputMethodImpl()

Public methods

void createSession(InputMethod.SessionCallback callback)

Instantiate a new client session for the input method, by calling back to AbstractInputMethodService.onCreateInputMethodSessionInterface().

void revokeSession(InputMethodSession session)

Take care of killing an existing session by calling its AbstractInputMethodSessionImpl.revokeSelf() method.

void setSessionEnabled(InputMethodSession session, boolean enabled)

Take care of enabling or disabling an existing session by calling its AbstractInputMethodSessionImpl.setEnabled() method.

Inherited methods

Object clone()

Creates and returns a copy of this object.

boolean equals(Object obj)

Indicates whether some other object is "equal to" this one.

void finalize()

Called by the garbage collector on an object when garbage collection determines that there are no more references to the object.

final Class<?> getClass()

Returns the runtime class of this Object.

int hashCode()

Returns a hash code value for the object.

final void notify()

Wakes up a single thread that is waiting on this object's monitor.

final void notifyAll()

Wakes up all threads that are waiting on this object's monitor.

String toString()

Returns a string representation of the object.

final void wait(long timeoutMillis, int nanos)

Causes the current thread to wait until it is awakened, typically by being notified or interrupted, or until a certain amount of real time has elapsed.

final void wait(long timeoutMillis)

Causes the current thread to wait until it is awakened, typically by being notified or interrupted, or until a certain amount of real time has elapsed.

final void wait()

Causes the current thread to wait until it is awakened, typically by being notified or interrupted.

abstract void attachToken(IBinder token)

Called first thing after an input method is created, this supplies a unique token for the session it has with the system service.

abstract void bindInput(InputBinding binding)

Bind a new application environment in to the input method, so that it can later start and stop input processing.

abstract void changeInputMethodSubtype(InputMethodSubtype subtype)

Notify that the input method subtype is being changed in the same input method.

abstract void createSession(InputMethod.SessionCallback callback)

Create a new InputMethodSession that can be handed to client applications for interacting with the input method.

abstract void hideSoftInput(int flags, ResultReceiver resultReceiver)

Request that any soft input part of the input method be hidden from the user.

abstract void restartInput(InputConnection inputConnection, EditorInfo editorInfo)

This method is called when the state of this input method needs to be reset.

abstract void revokeSession(InputMethodSession session)

Disable and destroy a session that was previously created with createSession(android.view.inputmethod.InputMethod.SessionCallback).

abstract void setSessionEnabled(InputMethodSession session, boolean enabled)

Control whether a particular input method session is active.

abstract void showSoftInput(int flags, ResultReceiver resultReceiver)

Request that any soft input part of the input method be shown to the user.

abstract void startInput(InputConnection inputConnection, EditorInfo editorInfo)

This method is called when the application starts to receive text and it is ready for this input method to process received events and send result text back to the application.

abstract void unbindInput()

Unbind an application environment, called when the information previously set by bindInput(InputBinding) is no longer valid for this input method.

Public constructors

AbstractInputMethodImpl

public AbstractInputMethodImpl ()

Public methods

createSession

Added in API level 3
public void createSession (InputMethod.SessionCallback callback)

Instantiate a new client session for the input method, by calling back to AbstractInputMethodService.onCreateInputMethodSessionInterface().
This method must be called from the main thread of your app.

Parameters
callback InputMethod.SessionCallback: Interface that is called with the newly created session.

revokeSession

Added in API level 3
public void revokeSession (InputMethodSession session)

Take care of killing an existing session by calling its AbstractInputMethodSessionImpl.revokeSelf() method.
This method must be called from the main thread of your app.

Parameters
session InputMethodSession: The InputMethodSession previously provided through SessionCallback.sessionCreated() that is to be revoked.

setSessionEnabled

Added in API level 3
public void setSessionEnabled (InputMethodSession session, 
                boolean enabled)

Take care of enabling or disabling an existing session by calling its AbstractInputMethodSessionImpl.setEnabled() method.
This method must be called from the main thread of your app.

Parameters
session InputMethodSession: The InputMethodSession previously provided through SessionCallback.sessionCreated() that is to be changed.

enabled boolean