diff options
author | Scott Main <smain@google.com> | 2011-10-18 11:19:44 -0700 |
---|---|---|
committer | Scott Main <smain@google.com> | 2011-10-18 11:19:44 -0700 |
commit | b22723c3f6befe5b2fb50333642818805aa8d52f (patch) | |
tree | 45c9b5617b6f5bad4c62378d55f3ef5f35ff7790 /core/java/android/service | |
parent | 1ff392128dfb802fe58e90ba23ed6138b1cd1a64 (diff) | |
download | frameworks_base-b22723c3f6befe5b2fb50333642818805aa8d52f.zip frameworks_base-b22723c3f6befe5b2fb50333642818805aa8d52f.tar.gz frameworks_base-b22723c3f6befe5b2fb50333642818805aa8d52f.tar.bz2 |
docs: add package summary for spell checker services
Change-Id: Iaac3293f941ec117ec28e031d5e24073e1269851
Diffstat (limited to 'core/java/android/service')
-rw-r--r-- | core/java/android/service/textservice/package.html | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/core/java/android/service/textservice/package.html b/core/java/android/service/textservice/package.html new file mode 100644 index 0000000..89c6dbc --- /dev/null +++ b/core/java/android/service/textservice/package.html @@ -0,0 +1,38 @@ +<HTML> +<BODY> +<p>Provides classes that allow you to create spell checkers in a manner similar to the +input method framework (for IMEs).</p> + +<p>To create a new spell checker, you must implement a service that extends {@link +android.service.textservice.SpellCheckerService} and extend the {@link +android.service.textservice.SpellCheckerService.Session} class to provide spelling suggestions based +on text provided by the interface's callback methods. In the {@link +android.service.textservice.SpellCheckerService.Session} callback methods, you must return the +spelling suggestions as {@link android.view.textservice.SuggestionsInfo} objects. </p> + +<p>Applications with a spell checker service must declare the {@link +android.Manifest.permission#BIND_TEXT_SERVICE} permission as required by the service. The service +must also declare an intent filter with {@code <action +android:name="android.service.textservice.SpellCheckerService" />} as the intent’s action and should +include a {@code <meta-data>} element that declares configuration information for the spell +checker. For example:</p> + +<pre> +<service + android:label="@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="@xml/spellchecker" /> +</service> +</pre> + +<p>For example code, see the <a +href="{@docRoot}resources/samples/SampleSpellCheckerService/index.html">Spell +Checker</a> sample app.</p> +</BODY> +</HTML> |