Please note that the contents of this offline web site may be out of date. To access the most recent documentation visit the online version .
Note that links that point to online resources are green in color and will open in a new window.
We would love it if you could give us feedback about this material by filling this form (You have to be online to fill it)
Android APIs
public abstract class

SpellCheckerService

extends Service
java.lang.Object
   ↳ android.content.Context
     ↳ android.content.ContextWrapper
       ↳ android.app.Service
         ↳ android.service.textservice.SpellCheckerService

Class Overview

SpellCheckerService provides an abstract base class for a spell checker. This class combines a service to the system with the spell checker service interface that spell checker must implement.

In addition to the normal Service lifecycle methods, this class introduces a new specific callback that subclasses should override createSession() to provide a spell checker session that is corresponding to requested language and so on. The spell checker session returned by this method should extend SpellCheckerService.Session .

Returning spell check results

onGetSuggestions(TextInfo, int) should return spell check results. It receives TextInfo and returns SuggestionsInfo for the input. You may want to override onGetSuggestionsMultiple(TextInfo[], int, boolean) for better performance and quality.

Please note that getLocale() does not return a valid locale before onCreate()

Summary

Nested Classes
class SpellCheckerService.Session This abstract class should be overridden by a concrete implementation of a spell checker. 
Constants
String SERVICE_INTERFACE
[Expand]
Inherited Constants
From class android.app.Service
From class android.content.Context
From interface android.content.ComponentCallbacks2
Public Constructors
SpellCheckerService ()
Public Methods
abstract SpellCheckerService.Session createSession ()
Factory method to create a spell checker session impl
final IBinder onBind ( Intent intent)
Implement to return the implementation of the internal spell checker service interface.
[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.content.ComponentCallbacks2

Constants

public static final String SERVICE_INTERFACE

Constant Value: "android.service.textservice.SpellCheckerService"

Public Constructors

public SpellCheckerService ()

Public Methods

public abstract SpellCheckerService.Session createSession ()

Factory method to create a spell checker session impl

Returns
  • SpellCheckerSessionImpl which should be overridden by a concrete implementation.

public final IBinder onBind ( Intent intent)

Implement to return the implementation of the internal spell checker service interface. Subclasses should not override.

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.