Added in API level 1
Deprecated in API level 5

Phones


class Phones : BaseColumns, Contacts.PeopleColumns, Contacts.PhonesColumns

This table stores phone numbers and a reference to the person that the contact method belongs to. Phone numbers are stored separately from other contact methods to make caller ID lookup more efficient.

Summary

Constants
static String

The MIME type of a CONTENT_URI subdirectory of a single phone.

static String

The MIME type of CONTENT_URI providing a directory of phones.

static String

The default sort order for this table

static String

The ID of the person this phone number is assigned to.

Inherited constants
String CUSTOM_RINGTONE

A custom ringtone associated with a person. Not always present.

Type: TEXT (URI to the ringtone)

String DISPLAY_NAME

The display name. If name is not null name, else if number is not null number, else if email is not null email.

Type: TEXT

String LAST_TIME_CONTACTED

The last time a person was contacted.

Type: INTEGER

String NAME

The person's name.

Type: TEXT

String NOTES

Notes about the person.

Type: TEXT

String PHONETIC_NAME

Phonetic equivalent of the person's name, in a locale-dependent character set (e.g. hiragana for Japanese). Used for pronunciation and/or collation in some languages.

Type: TEXT

String PHOTO_VERSION

The server version of the photo

Type: TEXT (the version number portion of the photo URI)

String SEND_TO_VOICEMAIL

Whether the person should always be sent to voicemail. Not always present.

Type: INTEGER (0 for false, 1 for true)

String STARRED

Is the contact starred?

Type: INTEGER (boolean)

String TIMES_CONTACTED

The number of times a person has been contacted

Type: INTEGER

String ISPRIMARY

Whether this is the primary phone number

Type: INTEGER (if set, non-0 means true)

String LABEL

The user provided label for the phone number, only used if TYPE is TYPE_CUSTOM.

Type: TEXT

String NUMBER

The phone number as the user entered it.

Type: TEXT

String NUMBER_KEY

The normalized phone number

Type: TEXT

String TYPE

The type of the the phone number.

Type: INTEGER (one of the constants below)

Int TYPE_CUSTOM

Int TYPE_FAX_HOME

Int TYPE_FAX_WORK

Int TYPE_HOME

Int TYPE_MOBILE

Int TYPE_OTHER

Int TYPE_PAGER

Int TYPE_WORK

String _COUNT

The count of rows in a directory.

Type: INTEGER

String _ID

The unique ID for a row.

Type: INTEGER (long)

Public methods
static CharSequence!
getDisplayLabel(context: Context!, type: Int, label: CharSequence!)

static CharSequence!
getDisplayLabel(context: Context!, type: Int, label: CharSequence!, labelArray: Array<CharSequence!>!)

Properties
static Uri!

The content:// style URL for filtering phone numbers

static Uri!

The content:// style URL for this table

Constants

CONTENT_ITEM_TYPE

Added in API level 1
static val CONTENT_ITEM_TYPE: String

Deprecated: see android.provider.ContactsContract

The MIME type of a CONTENT_URI subdirectory of a single phone.

Value: "vnd.android.cursor.item/phone"

CONTENT_TYPE

Added in API level 1
static val CONTENT_TYPE: String

Deprecated: see android.provider.ContactsContract

The MIME type of CONTENT_URI providing a directory of phones.

Value: "vnd.android.cursor.dir/phone"

DEFAULT_SORT_ORDER

Added in API level 1
static val DEFAULT_SORT_ORDER: String

Deprecated: see android.provider.ContactsContract

The default sort order for this table

Value: "name ASC"

PERSON_ID

Added in API level 1
static val PERSON_ID: String

Deprecated: see android.provider.ContactsContract

The ID of the person this phone number is assigned to.

Type: INTEGER (long)

Value: "person"

Public methods

getDisplayLabel

Added in API level 1
static fun getDisplayLabel(
    context: Context!,
    type: Int,
    label: CharSequence!
): CharSequence!

Deprecated: see android.provider.ContactsContract

getDisplayLabel

Added in API level 1
static fun getDisplayLabel(
    context: Context!,
    type: Int,
    label: CharSequence!,
    labelArray: Array<CharSequence!>!
): CharSequence!

Deprecated: see android.provider.ContactsContract

Properties

CONTENT_FILTER_URL

Added in API level 1
static val CONTENT_FILTER_URL: Uri!

Deprecated: see android.provider.ContactsContract

The content:// style URL for filtering phone numbers

CONTENT_URI

Added in API level 1
static val CONTENT_URI: Uri!

Deprecated: see android.provider.ContactsContract

The content:// style URL for this table