FileDocCategorySizeDatePackage
SpellCheckerService.javaAPI DocAndroid 5.1 API19192Thu Mar 12 22:22:10 GMT 2015android.service.textservice

SpellCheckerService

public abstract class SpellCheckerService extends android.app.Service
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 {@link #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 {@link SpellCheckerService.Session}.

Returning spell check results

{@link SpellCheckerService.Session#onGetSuggestions(TextInfo, int)} should return spell check results. It receives {@link android.view.textservice.TextInfo} and returns {@link android.view.textservice.SuggestionsInfo} for the input. You may want to override {@link SpellCheckerService.Session#onGetSuggestionsMultiple(TextInfo[], int, boolean)} for better performance and quality.

Please note that {@link SpellCheckerService.Session#getLocale()} does not return a valid locale before {@link SpellCheckerService.Session#onCreate()}

Fields Summary
private static final String
TAG
private static final boolean
DBG
public static final String
SERVICE_INTERFACE
private final SpellCheckerServiceBinder
mBinder
Constructors Summary
Methods Summary
public abstract android.service.textservice.SpellCheckerService$SessioncreateSession()
Factory method to create a spell checker session impl

return
SpellCheckerSessionImpl which should be overridden by a concrete implementation.

public final android.os.IBinderonBind(android.content.Intent intent)
Implement to return the implementation of the internal spell checker service interface. Subclasses should not override.



                         
    
          
        if (DBG) {
            Log.w(TAG, "onBind");
        }
        return mBinder;