From b22723c3f6befe5b2fb50333642818805aa8d52f Mon Sep 17 00:00:00 2001 From: Scott Main Date: Tue, 18 Oct 2011 11:19:44 -0700 Subject: [PATCH] docs: add package summary for spell checker services Change-Id: Iaac3293f941ec117ec28e031d5e24073e1269851 --- .../android/service/textservice/package.html | 38 +++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 core/java/android/service/textservice/package.html diff --git a/core/java/android/service/textservice/package.html b/core/java/android/service/textservice/package.html new file mode 100644 index 0000000000000..89c6dbccd34b8 --- /dev/null +++ b/core/java/android/service/textservice/package.html @@ -0,0 +1,38 @@ + + +

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 {@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.

+ +

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:

+ +
+<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>
+
+ +

For example code, see the Spell +Checker sample app.

+ +