public static abstract class

SpellCheckerService.Session

extends Object
java.lang.Object
   ↳ android.service.textservice.SpellCheckerService.Session

Class Overview

This abstract class should be overridden by a concrete implementation of a spell checker.

Summary

Public Constructors
SpellCheckerService.Session()
Public Methods
Bundle getBundle()
String getLocale()
void onCancel()
Request to abort all tasks executed in SpellChecker.
abstract void onCreate()
This is called after the class is initialized, at which point it knows it can call getLocale() etc...
abstract SuggestionsInfo onGetSuggestions(TextInfo textInfo, int suggestionsLimit)
Get suggestions for specified text in TextInfo.
SuggestionsInfo[] onGetSuggestionsMultiple(TextInfo[] textInfos, int suggestionsLimit, boolean sequentialWords)
A batch process of onGetSuggestions.
[Expand]
Inherited Methods
From class java.lang.Object

Public Constructors

public SpellCheckerService.Session ()

Since: API Level 14

Public Methods

public Bundle getBundle ()

Since: API Level 14

Returns
  • Bundle for this session

public String getLocale ()

Since: API Level 14

Returns
  • Locale for this session

public void onCancel ()

Since: API Level 14

Request to abort all tasks executed in SpellChecker. This function will run on the incoming IPC thread. So, this is not called on the main thread, but will be called in series on another thread.

public abstract void onCreate ()

Since: API Level 14

This is called after the class is initialized, at which point it knows it can call getLocale() etc...

public abstract SuggestionsInfo onGetSuggestions (TextInfo textInfo, int suggestionsLimit)

Since: API Level 14

Get suggestions for specified text in TextInfo. This function will run on the incoming IPC thread. So, this is not called on the main thread, but will be called in series on another thread.

Parameters
textInfo the text metadata
suggestionsLimit the number of limit of suggestions returned
Returns
  • SuggestionInfo which contains suggestions for textInfo

public SuggestionsInfo[] onGetSuggestionsMultiple (TextInfo[] textInfos, int suggestionsLimit, boolean sequentialWords)

Since: API Level 14

A batch process of onGetSuggestions. This function will run on the incoming IPC thread. So, this is not called on the main thread, but will be called in series on another thread.

Parameters
textInfos an array of the text metadata
suggestionsLimit the number of limit of suggestions returned
sequentialWords true if textInfos can be treated as sequential words.
Returns
  • an array of SuggestionInfo of onGetSuggestions