Added in API level 1
Deprecated in API level 5

ContactMethods


class ContactMethods : BaseColumns, Contacts.ContactMethodsColumns, Contacts.PeopleColumns

This table stores all non-phone contact methods and a reference to the person that the contact method belongs to.

Summary

Constants
static String

The MIME type of a CONTENT_URI sub-directory of a single Contacts.KIND_EMAIL entry.

static String

The MIME type of a CONTENT_EMAIL_URI sub-directory of multiple Contacts.KIND_EMAIL entries.

static String

The MIME type of a CONTENT_URI sub-directory of a single Contacts.KIND_IM entry.

static String

The MIME type of a CONTENT_URI sub-directory of a single Contacts.KIND_POSTAL entry.

static String

The MIME type of a CONTENT_EMAIL_URI sub-directory of multiple Contacts.KIND_POSTAL entries.

static String

The MIME type of CONTENT_URI providing a directory of

static String

The default sort order for this table

static String

The ID of the person this contact method is assigned to.

static String

The column with latitude data for postal locations

static String

The column with longitude data for postal locations

static Int

The predefined IM protocol types.

static Int

static Int

static Int

static Int

static Int

static Int

static Int

Inherited constants
String AUX_DATA

Auxiliary data for the contact method.

Type: TEXT

String DATA

The data for the contact method.

Type: TEXT

String ISPRIMARY

Whether this is the primary organization

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

String KIND

The kind of the the contact method. For example, email address, postal address, etc.

Type: INTEGER (one of the values below)

String LABEL

The user defined label for the the contact method.

Type: TEXT

String TYPE

The type of the contact method, must be one of the types below.

Type: INTEGER (one of the values below)

Int TYPE_CUSTOM

Int TYPE_HOME

Int TYPE_OTHER

Int TYPE_WORK

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 _COUNT

The count of rows in a directory.

Type: INTEGER

String _ID

The unique ID for a row.

Type: INTEGER (long)

Public methods
Unit
addPostalLocation(context: Context!, postalId: Long, latitude: Double, longitude: Double)

Add a longitude and latitude location to a postal address.

static Any!
decodeImProtocol(encodedString: String!)

static String!
encodeCustomImProtocol(protocolString: String!)

static String!

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

Properties
static Uri!

The content:// style URL for sub-directory of e-mail addresses.

static Uri!

The content:// style URL for this table

Constants

CONTENT_EMAIL_ITEM_TYPE

Added in API level 1
static val CONTENT_EMAIL_ITEM_TYPE: String

Deprecated: see android.provider.ContactsContract

The MIME type of a CONTENT_URI sub-directory of a single Contacts.KIND_EMAIL entry.

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

CONTENT_EMAIL_TYPE

Added in API level 1
static val CONTENT_EMAIL_TYPE: String

Deprecated: see android.provider.ContactsContract

The MIME type of a CONTENT_EMAIL_URI sub-directory of multiple Contacts.KIND_EMAIL entries.

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

CONTENT_IM_ITEM_TYPE

Added in API level 1
static val CONTENT_IM_ITEM_TYPE: String

Deprecated: see android.provider.ContactsContract

The MIME type of a CONTENT_URI sub-directory of a single Contacts.KIND_IM entry.

Value: "vnd.android.cursor.item/jabber-im"

CONTENT_POSTAL_ITEM_TYPE

Added in API level 1
static val CONTENT_POSTAL_ITEM_TYPE: String

Deprecated: see android.provider.ContactsContract

The MIME type of a CONTENT_URI sub-directory of a single Contacts.KIND_POSTAL entry.

Value: "vnd.android.cursor.item/postal-address"

CONTENT_POSTAL_TYPE

Added in API level 1
static val CONTENT_POSTAL_TYPE: String

Deprecated: see android.provider.ContactsContract

The MIME type of a CONTENT_EMAIL_URI sub-directory of multiple Contacts.KIND_POSTAL entries.

Value: "vnd.android.cursor.dir/postal-address"

CONTENT_TYPE

Added in API level 1
static val CONTENT_TYPE: String

Deprecated: see android.provider.ContactsContract phones.

The MIME type of CONTENT_URI providing a directory of

Value: "vnd.android.cursor.dir/contact-methods"

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 contact method is assigned to.

Type: INTEGER (long)

Value: "person"

POSTAL_LOCATION_LATITUDE

Added in API level 1
static val POSTAL_LOCATION_LATITUDE: String

Deprecated: see android.provider.ContactsContract

The column with latitude data for postal locations

Type: REAL

Value: "data"

POSTAL_LOCATION_LONGITUDE

Added in API level 1
static val POSTAL_LOCATION_LONGITUDE: String

Deprecated: see android.provider.ContactsContract

The column with longitude data for postal locations

Type: REAL

Value: "aux_data"

PROTOCOL_AIM

Added in API level 1
static val PROTOCOL_AIM: Int

Deprecated: see android.provider.ContactsContract

The predefined IM protocol types. The protocol can either be non-present, one of these types, or a free-form string. These cases are encoded in the AUX_DATA column as: - null - pre: - custom:

Value: 0

PROTOCOL_GOOGLE_TALK

Added in API level 1
static val PROTOCOL_GOOGLE_TALK: Int

Deprecated: see android.provider.ContactsContract

Value: 5

PROTOCOL_ICQ

Added in API level 1
static val PROTOCOL_ICQ: Int

Deprecated: see android.provider.ContactsContract

Value: 6

PROTOCOL_JABBER

Added in API level 1
static val PROTOCOL_JABBER: Int

Deprecated: see android.provider.ContactsContract

Value: 7

PROTOCOL_MSN

Added in API level 1
static val PROTOCOL_MSN: Int

Deprecated: see android.provider.ContactsContract

Value: 1

PROTOCOL_QQ

Added in API level 1
static val PROTOCOL_QQ: Int

Deprecated: see android.provider.ContactsContract

Value: 4

PROTOCOL_SKYPE

Added in API level 1
static val PROTOCOL_SKYPE: Int

Deprecated: see android.provider.ContactsContract

Value: 3

PROTOCOL_YAHOO

Added in API level 1
static val PROTOCOL_YAHOO: Int

Deprecated: see android.provider.ContactsContract

Value: 2

Public methods

addPostalLocation

Added in API level 1
fun addPostalLocation(
    context: Context!,
    postalId: Long,
    latitude: Double,
    longitude: Double
): Unit

Deprecated: see android.provider.ContactsContract

Add a longitude and latitude location to a postal address.

Parameters
context Context!: the context to use when updating the database
postalId Long: the address to update
latitude Double: the latitude for the address
longitude Double: the longitude for the address

decodeImProtocol

Added in API level 1
static fun decodeImProtocol(encodedString: String!): Any!

Deprecated: see android.provider.ContactsContract

encodeCustomImProtocol

Added in API level 1
static fun encodeCustomImProtocol(protocolString: String!): String!

Deprecated: see android.provider.ContactsContract

encodePredefinedImProtocol

Added in API level 1
static fun encodePredefinedImProtocol(protocol: Int): String!

Deprecated: see android.provider.ContactsContract

getDisplayLabel

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

Deprecated: see android.provider.ContactsContract

Properties

CONTENT_EMAIL_URI

Added in API level 1
static val CONTENT_EMAIL_URI: Uri!

Deprecated: see android.provider.ContactsContract

The content:// style URL for sub-directory of e-mail addresses.

CONTENT_URI

Added in API level 1
static val CONTENT_URI: Uri!

Deprecated: see android.provider.ContactsContract

The content:// style URL for this table