Android Guides | Samples

Android.Service.Textservice Namespace

Provides classes that allow you to create spell checkers in a manner similar to the input method framework (for IMEs).

Remarks

Provides classes that allow you to create spell checkers in a manner similar to the input method framework (for IMEs).

To create a new spell checker, you must implement a service that extends SpellCheckerService and extend the NoType:android/service/textservice/SpellCheckerService$Session;Href=../../../../reference/android/service/textservice/SpellCheckerService.Session.html class to provide spelling suggestions based on text provided by the interface's callback methods. In the NoType:android/service/textservice/SpellCheckerService$Session;Href=../../../../reference/android/service/textservice/SpellCheckerService.Session.html callback methods, you must return the spelling suggestions as SuggestionsInfo objects.

Applications with a spell checker service must declare the NoType:android/Manifest$permission;Href=../../../../reference/android/Manifest.permission.html#BIND_TEXT_SERVICE permission as required by the service. The service must also declare an intent filter with <action android:name="android.service.textservice.SpellCheckerService" /> as the intent’s action and should include a <meta-data> element that declares configuration information for the spell checker. For example:

xml Example

<service
    android:label="&#064;string/app_name"
    android:name=".SampleSpellCheckerService"
    android:permission="android.permission.BIND_TEXT_SERVICE" >
    <intent-filter >
        <action android:name="android.service.textservice.SpellCheckerService" />
    </intent-filter>
    <meta-data
        android:name="android.view.textservice.scs"
        android:resource="&#064;xml/spellchecker" />
</service>

For example code, see the sample Spell Checker service app, and the sample Spell Checker client app.

Classes

TypeReason
SpellCheckerServiceSpellCheckerService provides an abstract base class for a spell checker.
SpellCheckerService+SessionThis abstract class should be overridden by a concrete implementation of a spell checker.