1b22723c3f6befe5b2fb50333642818805aa8d52fScott Main<HTML> 2b22723c3f6befe5b2fb50333642818805aa8d52fScott Main<BODY> 3b22723c3f6befe5b2fb50333642818805aa8d52fScott Main<p>Provides classes that allow you to create spell checkers in a manner similar to the 4b22723c3f6befe5b2fb50333642818805aa8d52fScott Maininput method framework (for IMEs).</p> 5b22723c3f6befe5b2fb50333642818805aa8d52fScott Main 6b22723c3f6befe5b2fb50333642818805aa8d52fScott Main<p>To create a new spell checker, you must implement a service that extends {@link 7b22723c3f6befe5b2fb50333642818805aa8d52fScott Mainandroid.service.textservice.SpellCheckerService} and extend the {@link 8b22723c3f6befe5b2fb50333642818805aa8d52fScott Mainandroid.service.textservice.SpellCheckerService.Session} class to provide spelling suggestions based 9b22723c3f6befe5b2fb50333642818805aa8d52fScott Mainon text provided by the interface's callback methods. In the {@link 10b22723c3f6befe5b2fb50333642818805aa8d52fScott Mainandroid.service.textservice.SpellCheckerService.Session} callback methods, you must return the 11b22723c3f6befe5b2fb50333642818805aa8d52fScott Mainspelling suggestions as {@link android.view.textservice.SuggestionsInfo} objects. </p> 12b22723c3f6befe5b2fb50333642818805aa8d52fScott Main 13b22723c3f6befe5b2fb50333642818805aa8d52fScott Main<p>Applications with a spell checker service must declare the {@link 14b22723c3f6befe5b2fb50333642818805aa8d52fScott Mainandroid.Manifest.permission#BIND_TEXT_SERVICE} permission as required by the service. The service 15b22723c3f6befe5b2fb50333642818805aa8d52fScott Mainmust also declare an intent filter with {@code <action 16b22723c3f6befe5b2fb50333642818805aa8d52fScott Mainandroid:name="android.service.textservice.SpellCheckerService" />} as the intent’s action and should 17b22723c3f6befe5b2fb50333642818805aa8d52fScott Maininclude a {@code <meta-data>} element that declares configuration information for the spell 18b22723c3f6befe5b2fb50333642818805aa8d52fScott Mainchecker. For example:</p> 19b22723c3f6befe5b2fb50333642818805aa8d52fScott Main 20b22723c3f6befe5b2fb50333642818805aa8d52fScott Main<pre> 21b22723c3f6befe5b2fb50333642818805aa8d52fScott Main<service 22b22723c3f6befe5b2fb50333642818805aa8d52fScott Main android:label="@string/app_name" 23b22723c3f6befe5b2fb50333642818805aa8d52fScott Main android:name=".SampleSpellCheckerService" 24b22723c3f6befe5b2fb50333642818805aa8d52fScott Main android:permission="android.permission.BIND_TEXT_SERVICE" > 25b22723c3f6befe5b2fb50333642818805aa8d52fScott Main <intent-filter > 26b22723c3f6befe5b2fb50333642818805aa8d52fScott Main <action android:name="android.service.textservice.SpellCheckerService" /> 27b22723c3f6befe5b2fb50333642818805aa8d52fScott Main </intent-filter> 28b22723c3f6befe5b2fb50333642818805aa8d52fScott Main <meta-data 29b22723c3f6befe5b2fb50333642818805aa8d52fScott Main android:name="android.view.textservice.scs" 30b22723c3f6befe5b2fb50333642818805aa8d52fScott Main android:resource="@xml/spellchecker" /> 31b22723c3f6befe5b2fb50333642818805aa8d52fScott Main</service> 32b22723c3f6befe5b2fb50333642818805aa8d52fScott Main</pre> 33b22723c3f6befe5b2fb50333642818805aa8d52fScott Main 34182e4ae2f4bbfdd2272f6e425c6f3734b3f157bfsatok<p>For example code, see the sample <a 3544619d3e087138775fb19fbd5d7b9f497a0805f4satokhref="{@docRoot}resources/samples/SpellChecker/SampleSpellCheckerService/index.html">Spell 36182e4ae2f4bbfdd2272f6e425c6f3734b3f157bfsatokChecker service</a> app, and the sample <a 37182e4ae2f4bbfdd2272f6e425c6f3734b3f157bfsatokhref="{@docRoot}resources/samples/SpellChecker/HelloSpellChecker/index.html">Spell 38182e4ae2f4bbfdd2272f6e425c6f3734b3f157bfsatokChecker client</a> app.</p> 39b22723c3f6befe5b2fb50333642818805aa8d52fScott Main</BODY> 40b22723c3f6befe5b2fb50333642818805aa8d52fScott Main</HTML> 41