Contacts.People


public static final class Contacts.People
extends Object implements BaseColumns, Contacts.PeopleColumns, Contacts.PhonesColumns, Contacts.PresenceColumns

java.lang.Object
   ↳ android.provider.Contacts.People


This class was deprecated in API level 5.
see ContactsContract

This table contains people.

Summary

Nested classes

class Contacts.People.ContactMethods

This class was deprecated in API level 5. see ContactsContract 

class Contacts.People.Extensions

This class was deprecated in API level 5. see ContactsContract 

class Contacts.People.Phones

This class was deprecated in API level 5. see ContactsContract 

Constants

String CONTENT_ITEM_TYPE

This constant is deprecated. see ContactsContract

String CONTENT_TYPE

This constant is deprecated. see ContactsContract

String DEFAULT_SORT_ORDER

This constant is deprecated. see ContactsContract

String PRIMARY_EMAIL_ID

This constant is deprecated. see ContactsContract

String PRIMARY_ORGANIZATION_ID

This constant is deprecated. see ContactsContract

String PRIMARY_PHONE_ID

This constant is deprecated. see ContactsContract

Inherited constants

String _COUNT

The count of rows in a directory.

String _ID

The unique ID for a row.

String CUSTOM_RINGTONE

This constant is deprecated. see ContactsContract

String DISPLAY_NAME

This constant is deprecated. see ContactsContract

String LAST_TIME_CONTACTED

This constant is deprecated. see ContactsContract

String NAME

This constant is deprecated. see ContactsContract

String NOTES

This constant is deprecated. see ContactsContract

String PHONETIC_NAME

This constant was deprecated in API level 5. see ContactsContract

String PHOTO_VERSION

This constant is deprecated. see ContactsContract

String SEND_TO_VOICEMAIL

This constant is deprecated. see ContactsContract

String STARRED

This constant is deprecated. see ContactsContract

String TIMES_CONTACTED

This constant is deprecated. see ContactsContract

String ISPRIMARY

This constant is deprecated. see ContactsContract

String LABEL

This constant is deprecated. see ContactsContract

String NUMBER

This constant is deprecated. see ContactsContract

String NUMBER_KEY

This constant is deprecated. see ContactsContract

String TYPE

This constant is deprecated. see ContactsContract

int TYPE_CUSTOM

This constant is deprecated. see ContactsContract

int TYPE_FAX_HOME

This constant is deprecated. see ContactsContract

int TYPE_FAX_WORK

This constant is deprecated. see ContactsContract

int TYPE_HOME

This constant is deprecated. see ContactsContract

int TYPE_MOBILE

This constant is deprecated. see ContactsContract

int TYPE_OTHER

This constant is deprecated. see ContactsContract

int TYPE_PAGER

This constant is deprecated. see ContactsContract

int TYPE_WORK

This constant is deprecated. see ContactsContract

int AVAILABLE

int AWAY

int DO_NOT_DISTURB

int IDLE

String IM_ACCOUNT

This constant is deprecated. see ContactsContract

String IM_HANDLE

This constant is deprecated. see ContactsContract

String IM_PROTOCOL

This constant is deprecated. see ContactsContract

int INVISIBLE

int OFFLINE

Presence Status definition

String PRESENCE_CUSTOM_STATUS

The user defined status line.

String PRESENCE_STATUS

The server defined status.

String PRIORITY

The priority, an integer, used by XMPP presence

Type: INTEGER

Fields

public static final Uri CONTENT_FILTER_URI

This field is deprecated. see ContactsContract

public static final Uri CONTENT_URI

This field is deprecated. see ContactsContract

public static final Uri DELETED_CONTENT_URI

This field is deprecated. see ContactsContract

Public methods

static Uri addToGroup(ContentResolver resolver, long personId, long groupId)

This method is deprecated. see ContactsContract

static Uri addToGroup(ContentResolver resolver, long personId, String groupName)

This method is deprecated. see ContactsContract

static Uri addToMyContactsGroup(ContentResolver resolver, long personId)

This method is deprecated. see ContactsContract

static Uri createPersonInMyContactsGroup(ContentResolver resolver, ContentValues values)

This method is deprecated. see ContactsContract

static Bitmap loadContactPhoto(Context context, Uri person, int placeholderImageResource, BitmapFactory.Options options)

This method is deprecated. see ContactsContract

static void markAsContacted(ContentResolver resolver, long personId)

This API is no longer supported as of O.

static InputStream openContactPhotoInputStream(ContentResolver cr, Uri person)

This method is deprecated. see ContactsContract

static Cursor queryGroups(ContentResolver resolver, long person)

This method is deprecated. see ContactsContract

static void setPhotoData(ContentResolver cr, Uri person, byte[] data)

This method is deprecated. see ContactsContract

Inherited methods

Object clone()

Creates and returns a copy of this object.

boolean equals(Object obj)

Indicates whether some other object is "equal to" this one.

void finalize()

Called by the garbage collector on an object when garbage collection determines that there are no more references to the object.

final Class<?> getClass()

Returns the runtime class of this Object.

int hashCode()

Returns a hash code value for the object.

final void notify()

Wakes up a single thread that is waiting on this object's monitor.

final void notifyAll()

Wakes up all threads that are waiting on this object's monitor.

String toString()

Returns a string representation of the object.

final void wait(long timeoutMillis, int nanos)

Causes the current thread to wait until it is awakened, typically by being notified or interrupted, or until a certain amount of real time has elapsed.

final void wait(long timeoutMillis)

Causes the current thread to wait until it is awakened, typically by being notified or interrupted, or until a certain amount of real time has elapsed.

final void wait()

Causes the current thread to wait until it is awakened, typically by being notified or interrupted.

Constants

CONTENT_ITEM_TYPE

Added in API level 1
public static final String CONTENT_ITEM_TYPE

This constant is deprecated.
see ContactsContract

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

Constant Value: "vnd.android.cursor.item/person"

CONTENT_TYPE

Added in API level 1
public static final String CONTENT_TYPE

This constant is deprecated.
see ContactsContract

The MIME type of CONTENT_URI providing a directory of people.

Constant Value: "vnd.android.cursor.dir/person"

DEFAULT_SORT_ORDER

Added in API level 1
public static final String DEFAULT_SORT_ORDER

This constant is deprecated.
see ContactsContract

The default sort order for this table

Constant Value: "name ASC"

PRIMARY_EMAIL_ID

Added in API level 1
public static final String PRIMARY_EMAIL_ID

This constant is deprecated.
see ContactsContract

The ID of the persons preferred email.

Type: INTEGER (foreign key to contact_methods table on the _ID field)

Constant Value: "primary_email"

PRIMARY_ORGANIZATION_ID

Added in API level 1
public static final String PRIMARY_ORGANIZATION_ID

This constant is deprecated.
see ContactsContract

The ID of the persons preferred organization.

Type: INTEGER (foreign key to organizations table on the _ID field)

Constant Value: "primary_organization"

PRIMARY_PHONE_ID

Added in API level 1
public static final String PRIMARY_PHONE_ID

This constant is deprecated.
see ContactsContract

The ID of the persons preferred phone number.

Type: INTEGER (foreign key to phones table on the _ID field)

Constant Value: "primary_phone"

Fields

CONTENT_FILTER_URI

Added in API level 1
public static final Uri CONTENT_FILTER_URI

This field is deprecated.
see ContactsContract

The content:// style URL for filtering people by name. The filter argument should be passed as an additional path segment after this URI.

CONTENT_URI

Added in API level 1
public static final Uri CONTENT_URI

This field is deprecated.
see ContactsContract

The content:// style URL for this table

DELETED_CONTENT_URI

Added in API level 1
public static final Uri DELETED_CONTENT_URI

This field is deprecated.
see ContactsContract

The content:// style URL for the table that holds the deleted contacts.

Public methods

addToGroup

Added in API level 1
public static Uri addToGroup (ContentResolver resolver, 
                long personId, 
                long groupId)

This method is deprecated.
see ContactsContract

Adds a person to a group.

Parameters
resolver ContentResolver: the resolver to use

personId long: the person to add to the group

groupId long: the group to add the person to

Returns
Uri the URI of the group membership row

addToGroup

Added in API level 1
public static Uri addToGroup (ContentResolver resolver, 
                long personId, 
                String groupName)

This method is deprecated.
see ContactsContract

Adds a person to a group referred to by name.

Parameters
resolver ContentResolver: the resolver to use

personId long: the person to add to the group

groupName String: the name of the group to add the contact to

Returns
Uri the URI of the group membership row

Throws
IllegalStateException if the group can't be found

addToMyContactsGroup

Added in API level 1
public static Uri addToMyContactsGroup (ContentResolver resolver, 
                long personId)

This method is deprecated.
see ContactsContract

Adds a person to the My Contacts group.

Parameters
resolver ContentResolver: the resolver to use

personId long: the person to add to the group

Returns
Uri the URI of the group membership row

Throws
IllegalStateException if the My Contacts group can't be found

createPersonInMyContactsGroup

Added in API level 1
public static Uri createPersonInMyContactsGroup (ContentResolver resolver, 
                ContentValues values)

This method is deprecated.
see ContactsContract

Creates a new contacts and adds it to the "My Contacts" group.

Parameters
resolver ContentResolver: the ContentResolver to use

values ContentValues: the values to use when creating the contact

Returns
Uri the URI of the contact, or null if the operation fails

loadContactPhoto

Added in API level 1
public static Bitmap loadContactPhoto (Context context, 
                Uri person, 
                int placeholderImageResource, 
                BitmapFactory.Options options)

This method is deprecated.
see ContactsContract

Opens an InputStream for the person's photo and returns the photo as a Bitmap. If the person's photo isn't present returns the placeholderImageResource instead.

Parameters
context Context: the Context

person Uri: the person whose photo should be used

placeholderImageResource int: the image resource to use if the person doesn't have a photo

options BitmapFactory.Options: the decoding options, can be set to null

Returns
Bitmap

markAsContacted

Added in API level 1
public static void markAsContacted (ContentResolver resolver, 
                long personId)

This API is no longer supported as of O.

Parameters
resolver ContentResolver

personId long

openContactPhotoInputStream

Added in API level 1
public static InputStream openContactPhotoInputStream (ContentResolver cr, 
                Uri person)

This method is deprecated.
see ContactsContract

Opens an InputStream for the person's photo and returns the photo as a Bitmap. If the person's photo isn't present returns the placeholderImageResource instead.

Parameters
cr ContentResolver

person Uri: the person whose photo should be used

Returns
InputStream

queryGroups

Added in API level 1
public static Cursor queryGroups (ContentResolver resolver, 
                long person)

This method is deprecated.
see ContactsContract

Parameters
resolver ContentResolver

person long

Returns
Cursor

setPhotoData

Added in API level 1
public static void setPhotoData (ContentResolver cr, 
                Uri person, 
                byte[] data)

This method is deprecated.
see ContactsContract

Set the photo for this person. data may be null

Parameters
cr ContentResolver: the ContentResolver to use

person Uri: the Uri of the person whose photo is to be updated

data byte: the byte[] that represents the photo