public abstract class

AbstractInputMethodService

extends Service
implements KeyEvent.Callback
java.lang.Object
   ↳ android.content.Context
     ↳ android.content.ContextWrapper
       ↳ android.app.Service
         ↳ android.inputmethodservice.AbstractInputMethodService
Known Direct Subclasses

Class Overview

AbstractInputMethodService provides a abstract base class for input methods. Normal input method implementations will not derive from this directly, instead building on top of InputMethodService or another more complete base class. Be sure to read InputMethod for more information on the basics of writing input methods.

This class combines a Service (representing the input method component to the system with the InputMethod interface that input methods must implement. This base class takes care of reporting your InputMethod from the service when clients bind to it, but provides no standard implementation of the InputMethod interface itself. Derived classes must implement that interface.

Summary

Nested Classes
public abstract class AbstractInputMethodService.AbstractInputMethodImpl Base class for derived classes to implement their InputMethod interface. 
public abstract class AbstractInputMethodService.AbstractInputMethodSessionImpl Base class for derived classes to implement their InputMethodSession interface. 
[Expand]
Inherited Constants
From class android.content.Context
Public Constructors
AbstractInputMethodService()
Public Methods
final IBinder onBind(Intent intent)
Return the communication channel to the service.
abstract AbstractInputMethodService.AbstractInputMethodImpl onCreateInputMethodInterface()
Called by the framework during initialization, when the InputMethod interface for this service needs to be created.
abstract AbstractInputMethodService.AbstractInputMethodSessionImpl onCreateInputMethodSessionInterface()
Called by the framework when a new InputMethodSession interface is needed for a new client of the input method.
boolean onTrackballEvent(MotionEvent event)
Protected Methods
void dump(FileDescriptor fd, PrintWriter fout, String[] args)
Implement this to handle Binder.dump() calls on your input method.
[Expand]
Inherited Methods
From class android.app.Service
From class android.content.ContextWrapper
From class android.content.Context
From class java.lang.Object
From interface android.content.ComponentCallbacks
From interface android.view.KeyEvent.Callback

Public Constructors

public AbstractInputMethodService ()

Public Methods

public final IBinder onBind (Intent intent)

Return the communication channel to the service. May return null if clients can not bind to the service. The returned IBinder is usually for a complex interface that has been described using aidl.

Note that unlike other application components, calls on to the IBinder interface returned here may not happen on the main thread of the process. More information about this can be found in Application Fundamentals: Processes and Threads.

Parameters
intent The Intent that was used to bind to this service, as given to Context.bindService. Note that any extras that were included with the Intent at that point will not be seen here.
Returns
  • Return an IBinder through which clients can call on to the service.

public abstract AbstractInputMethodService.AbstractInputMethodImpl onCreateInputMethodInterface ()

Called by the framework during initialization, when the InputMethod interface for this service needs to be created.

public abstract AbstractInputMethodService.AbstractInputMethodSessionImpl onCreateInputMethodSessionInterface ()

Called by the framework when a new InputMethodSession interface is needed for a new client of the input method.

public boolean onTrackballEvent (MotionEvent event)

Protected Methods

protected void dump (FileDescriptor fd, PrintWriter fout, String[] args)

Implement this to handle Binder.dump() calls on your input method.

Parameters
fd The raw file descriptor that the dump is being sent to.
fout The PrintWriter to which you should dump your state. This will be closed for you after you return.
args additional arguments to the dump request.