UserDictionary.Words
  public
  static
  
  
  class
  UserDictionary.Words
  
    extends Object
  
  
  
  
  
      implements
      
        BaseColumns
      
  
  
| java.lang.Object | |
| ↳ | android.provider.UserDictionary.Words | 
Contains the user defined words.
Summary
| Constants | |
|---|---|
| String | APP_IDThe uid of the application that inserted the word. | 
| String | CONTENT_ITEM_TYPEThe MIME type of a  | 
| String | CONTENT_TYPEThe MIME type of  | 
| String | DEFAULT_SORT_ORDERSort by descending order of frequency. | 
| String | FREQUENCYThe frequency column. | 
| String | LOCALEThe locale that this word belongs to. | 
| int | LOCALE_TYPE_ALL
      This constant was deprecated
      in API level 16.
    Use  | 
| int | LOCALE_TYPE_CURRENT
      This constant was deprecated
      in API level 16.
    Use  | 
| String | SHORTCUTAn optional shortcut for this word. | 
| String | WORDThe word column. | 
| String | _ID
 | 
| Inherited constants | 
|---|
| Fields | |
|---|---|
| 
    public
    static
    final
    Uri | CONTENT_URIThe content:// style URL for this table | 
| Public constructors | |
|---|---|
| 
      Words()
       | |
| Public methods | |
|---|---|
| 
        
        
        static
        
        
        void | 
      addWord(Context context, String word, int frequency, int localeType)
      
      This method was deprecated
      in API level 16.
    Please use
   | 
| 
        
        
        static
        
        
        void | 
      addWord(Context context, String word, int frequency, String shortcut, Locale locale)
      Adds a word to the dictionary, with the given frequency and the specified locale type. | 
| Inherited methods | |
|---|---|
Constants
APP_ID
public static final String APP_ID
The uid of the application that inserted the word.
TYPE: INTEGER
Constant Value: "appid"
CONTENT_ITEM_TYPE
public static final String CONTENT_ITEM_TYPE
The MIME type of a CONTENT_URI sub-directory of a single word.
Constant Value: "vnd.android.cursor.item/vnd.google.userword"
CONTENT_TYPE
public static final String CONTENT_TYPE
The MIME type of CONTENT_URI providing a directory of words.
Constant Value: "vnd.android.cursor.dir/vnd.google.userword"
DEFAULT_SORT_ORDER
public static final String DEFAULT_SORT_ORDER
Sort by descending order of frequency.
Constant Value: "frequency DESC"
FREQUENCY
public static final String FREQUENCY
The frequency column. A value between 1 and 255. Higher values imply higher frequency.
TYPE: INTEGER
Constant Value: "frequency"
LOCALE
public static final String LOCALE
The locale that this word belongs to. Null if it pertains to all locales. Locale is as defined by the string returned by Locale.toString().
TYPE: TEXT
Constant Value: "locale"
LOCALE_TYPE_ALL
public static final int LOCALE_TYPE_ALL
      This constant was deprecated
      in API level 16.
    Use addWord(android.content.Context, java.lang.String, int, java.lang.String, java.util.Locale).
  
Constant Value: 0 (0x00000000)
LOCALE_TYPE_CURRENT
public static final int LOCALE_TYPE_CURRENT
      This constant was deprecated
      in API level 16.
    Use addWord(android.content.Context, java.lang.String, int, java.lang.String, java.util.Locale).
  
Constant Value: 1 (0x00000001)
SHORTCUT
public static final String SHORTCUT
An optional shortcut for this word. When the shortcut is typed, supporting IMEs should suggest the word in this row as an alternate spelling too.
Constant Value: "shortcut"
WORD
public static final String WORD
The word column.
TYPE: TEXT
Constant Value: "word"
Fields
CONTENT_URI
public static final Uri CONTENT_URI
The content:// style URL for this table
Public constructors
Words
public Words ()
Public methods
addWord
public static void addWord (Context context, String word, int frequency, int localeType)
      This method was deprecated
      in API level 16.
    Please use
  addWord(android.content.Context, java.lang.String, int, java.lang.String, java.util.Locale) instead.
  
Adds a word to the dictionary, with the given frequency and the specified specified locale type.
| Parameters | |
|---|---|
| context | Context: the current application context | 
| word | String: the word to add to the dictionary. This should not be null or
  empty. | 
| frequency | int | 
| localeType | int: the locale type for this word. It should be one ofLOCALE_TYPE_ALLorLOCALE_TYPE_CURRENT. | 
addWord
public static void addWord (Context context, String word, int frequency, String shortcut, Locale locale)
Adds a word to the dictionary, with the given frequency and the specified locale type.
| Parameters | |
|---|---|
| context | Context: the current application context | 
| word | String: the word to add to the dictionary. This should not be null or
  empty. | 
| frequency | int | 
| shortcut | String: optional shortcut spelling for this word. When the shortcut
  is typed, the word may be suggested by applications that support it. May be null. | 
| locale | Locale: the locale to insert the word for, or null to insert the word
  for all locales. | 
