Skip to content

Commit 35f78f3

Browse files
scottamainAndroid (Google) Code Review
authored andcommitted
Merge "docs: add package summary for spell checker services" into ics-mr0
2 parents 2720cfa + b22723c commit 35f78f3

File tree

1 file changed

+38
-0
lines changed

1 file changed

+38
-0
lines changed
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
<HTML>
2+
<BODY>
3+
<p>Provides classes that allow you to create spell checkers in a manner similar to the
4+
input method framework (for IMEs).</p>
5+
6+
<p>To create a new spell checker, you must implement a service that extends {@link
7+
android.service.textservice.SpellCheckerService} and extend the {@link
8+
android.service.textservice.SpellCheckerService.Session} class to provide spelling suggestions based
9+
on text provided by the interface's callback methods. In the {@link
10+
android.service.textservice.SpellCheckerService.Session} callback methods, you must return the
11+
spelling suggestions as {@link android.view.textservice.SuggestionsInfo} objects. </p>
12+
13+
<p>Applications with a spell checker service must declare the {@link
14+
android.Manifest.permission#BIND_TEXT_SERVICE} permission as required by the service. The service
15+
must also declare an intent filter with {@code &lt;action
16+
android:name="android.service.textservice.SpellCheckerService" />} as the intent’s action and should
17+
include a {@code &lt;meta-data&gt;} element that declares configuration information for the spell
18+
checker. For example:</p>
19+
20+
<pre>
21+
&lt;service
22+
android:label="&#064;string/app_name"
23+
android:name=".SampleSpellCheckerService"
24+
android:permission="android.permission.BIND_TEXT_SERVICE" >
25+
&lt;intent-filter >
26+
&lt;action android:name="android.service.textservice.SpellCheckerService" />
27+
&lt;/intent-filter>
28+
&lt;meta-data
29+
android:name="android.view.textservice.scs"
30+
android:resource="&#064;xml/spellchecker" />
31+
&lt;/service>
32+
</pre>
33+
34+
<p>For example code, see the <a
35+
href="{@docRoot}resources/samples/SampleSpellCheckerService/index.html">Spell
36+
Checker</a> sample app.</p>
37+
</BODY>
38+
</HTML>

0 commit comments

Comments
 (0)