Added in API level 3

Words


open class Words : BaseColumns
kotlin.Any
   ↳ android.provider.UserDictionary.Words

Contains the user defined words.

Summary

Constants
static String

The uid of the application that inserted the word.

static String

The MIME type of a CONTENT_URI sub-directory of a single word.

static String

The MIME type of CONTENT_URI providing a directory of words.

static String

Sort by descending order of frequency.

static String

The frequency column.

static String

The locale that this word belongs to.

static Int

static Int

static String

An optional shortcut for this word.

static String

The word column.

static String

Inherited constants
Public constructors

Public methods
open static Unit
addWord(context: Context!, word: String!, frequency: Int, localeType: Int)

Adds a word to the dictionary, with the given frequency and the specified specified locale type.

open static Unit
addWord(context: Context!, word: String!, frequency: Int, shortcut: String!, locale: Locale!)

Adds a word to the dictionary, with the given frequency and the specified locale type.

Properties
static Uri!

The content:// style URL for this table

Constants

APP_ID

Added in API level 3
static val APP_ID: String

The uid of the application that inserted the word.

TYPE: INTEGER

Value: "appid"

CONTENT_ITEM_TYPE

Added in API level 3
static val CONTENT_ITEM_TYPE: String

The MIME type of a CONTENT_URI sub-directory of a single word.

Value: "vnd.android.cursor.item/vnd.google.userword"

CONTENT_TYPE

Added in API level 3
static val CONTENT_TYPE: String

The MIME type of CONTENT_URI providing a directory of words.

Value: "vnd.android.cursor.dir/vnd.google.userword"

DEFAULT_SORT_ORDER

Added in API level 3
static val DEFAULT_SORT_ORDER: String

Sort by descending order of frequency.

Value: "frequency DESC"

FREQUENCY

Added in API level 3
static val FREQUENCY: String

The frequency column. A value between 1 and 255. Higher values imply higher frequency.

TYPE: INTEGER

Value: "frequency"

LOCALE

Added in API level 3
static val LOCALE: String

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

Value: "locale"

LOCALE_TYPE_ALL

Added in API level 3
Deprecated in API level 16
static val LOCALE_TYPE_ALL: Int

Deprecated: Use addWord(android.content.Context,java.lang.String,int,java.lang.String,java.util.Locale).

Value: 0

LOCALE_TYPE_CURRENT

Added in API level 3
Deprecated in API level 16
static val LOCALE_TYPE_CURRENT: Int

Deprecated: Use addWord(android.content.Context,java.lang.String,int,java.lang.String,java.util.Locale).

Value: 1

SHORTCUT

Added in API level 16
static val SHORTCUT: String

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.

Value: "shortcut"

WORD

Added in API level 3
static val WORD: String

The word column.

TYPE: TEXT

Value: "word"

_ID

Added in API level 3
static val _ID: String
Value: "_id"

Public constructors

Words

Words()

Public methods

addWord

Added in API level 3
Deprecated in API level 16
open static fun addWord(
    context: Context!,
    word: String!,
    frequency: Int,
    localeType: Int
): Unit

Deprecated: 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.
localeType Int: the locale type for this word. It should be one of LOCALE_TYPE_ALL or LOCALE_TYPE_CURRENT.

addWord

Added in API level 16
open static fun addWord(
    context: Context!,
    word: String!,
    frequency: Int,
    shortcut: String!,
    locale: Locale!
): Unit

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

Properties

CONTENT_URI

Added in API level 3
static val CONTENT_URI: Uri!

The content:// style URL for this table