People
classPeople: BaseColumns, Contacts.PeopleColumns, Contacts.PhonesColumns, Contacts.PresenceColumns
kotlin.Any | |
↳ | android.provider.Contacts.People |
This table contains people.
Summary
Nested classes | |
---|---|
A subdirectory of a single person that contains all of their ContactMethods. |
|
The extensions for a person |
|
A sub directory of a single person that contains all of their Phones. |
Constants | |
---|---|
static String |
The MIME type of a |
static String |
The MIME type of |
static String |
The default sort order for this table |
static String |
The ID of the persons preferred email. |
static String |
The ID of the persons preferred organization. |
static String |
The ID of the persons preferred phone number. |
Inherited constants | |
---|---|
Public methods | |
---|---|
static Uri! |
addToGroup(resolver: ContentResolver!, personId: Long, groupName: String!) Adds a person to a group referred to by name. |
static Uri! |
addToGroup(resolver: ContentResolver!, personId: Long, groupId: Long) Adds a person to a group. |
static Uri! |
addToMyContactsGroup(resolver: ContentResolver!, personId: Long) Adds a person to the My Contacts group. |
static Uri! |
createPersonInMyContactsGroup(resolver: ContentResolver!, values: ContentValues!) Creates a new contacts and adds it to the "My Contacts" group. |
static Bitmap! |
loadContactPhoto(context: Context!, person: Uri!, placeholderImageResource: Int, options: BitmapFactory.Options!) Opens an InputStream for the person's photo and returns the photo as a Bitmap. |
static Unit |
markAsContacted(resolver: ContentResolver!, personId: Long) This API is no longer supported as of O. |
static InputStream! |
openContactPhotoInputStream(cr: ContentResolver!, person: Uri!) Opens an InputStream for the person's photo and returns the photo as a Bitmap. |
static Cursor! |
queryGroups(resolver: ContentResolver!, person: Long) |
static Unit |
setPhotoData(cr: ContentResolver!, person: Uri!, data: ByteArray!) Set the photo for this person. |
Properties | |
---|---|
static Uri! |
The content:// style URL for filtering people by name. |
static Uri! |
The content:// style URL for this table |
static Uri! |
The content:// style URL for the table that holds the deleted contacts. |
Constants
CONTENT_ITEM_TYPE
static valCONTENT_ITEM_TYPE: String
Deprecated: see android.provider.ContactsContract
The MIME type of a CONTENT_URI
subdirectory of a single person.
Value: "vnd.android.cursor.item/person"
CONTENT_TYPE
static valCONTENT_TYPE: String
Deprecated: see android.provider.ContactsContract
The MIME type of CONTENT_URI
providing a directory of people.
Value: "vnd.android.cursor.dir/person"
DEFAULT_SORT_ORDER
static valDEFAULT_SORT_ORDER: String
Deprecated: see android.provider.ContactsContract
The default sort order for this table
Value: "name ASC"
PRIMARY_EMAIL_ID
static valPRIMARY_EMAIL_ID: String
Deprecated: see android.provider.ContactsContract
The ID of the persons preferred email.
Type: INTEGER (foreign key to contact_methods table on the _ID field)
Value: "primary_email"
PRIMARY_ORGANIZATION_ID
static valPRIMARY_ORGANIZATION_ID: String
Deprecated: see android.provider.ContactsContract
The ID of the persons preferred organization.
Type: INTEGER (foreign key to organizations table on the _ID field)
Value: "primary_organization"
PRIMARY_PHONE_ID
static valPRIMARY_PHONE_ID: String
Deprecated: see android.provider.ContactsContract
The ID of the persons preferred phone number.
Type: INTEGER (foreign key to phones table on the _ID field)
Value: "primary_phone"
Public methods
addToGroup
static funaddToGroup(
resolver: ContentResolver!,
personId: Long,
groupName: String!
): Uri!
Deprecated: see android.provider.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 |
Return | |
---|---|
Uri! |
the URI of the group membership row |
Exceptions | |
---|---|
java.lang.IllegalStateException |
if the group can't be found |
addToGroup
static funaddToGroup(
resolver: ContentResolver!,
personId: Long,
groupId: Long
): Uri!
Deprecated: see android.provider.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 |
Return | |
---|---|
Uri! |
the URI of the group membership row |
addToMyContactsGroup
static funaddToMyContactsGroup(
resolver: ContentResolver!,
personId: Long
): Uri!
Deprecated: see android.provider.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 |
Return | |
---|---|
Uri! |
the URI of the group membership row |
Exceptions | |
---|---|
java.lang.IllegalStateException |
if the My Contacts group can't be found |
createPersonInMyContactsGroup
static funcreatePersonInMyContactsGroup(
resolver: ContentResolver!,
values: ContentValues!
): Uri!
Deprecated: see android.provider.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 |
Return | |
---|---|
Uri! |
the URI of the contact, or null if the operation fails |
loadContactPhoto
static funloadContactPhoto(
context: Context!,
person: Uri!,
placeholderImageResource: Int,
options: BitmapFactory.Options!
): Bitmap!
Deprecated: see android.provider.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 |
markAsContacted
static funmarkAsContacted(
resolver: ContentResolver!,
personId: Long
): Unit
Deprecated: Deprecated in Java.
This API is no longer supported as of O.
openContactPhotoInputStream
static funopenContactPhotoInputStream(
cr: ContentResolver!,
person: Uri!
): InputStream!
Deprecated: see android.provider.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 | |
---|---|
person |
Uri!: the person whose photo should be used |
queryGroups
static funqueryGroups(
resolver: ContentResolver!,
person: Long
): Cursor!
Deprecated: see android.provider.ContactsContract
setPhotoData
static funsetPhotoData(
cr: ContentResolver!,
person: Uri!,
data: ByteArray!
): Unit
Deprecated: see android.provider.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 |
ByteArray!: the byte[] that represents the photo |
Properties
CONTENT_FILTER_URI
static valCONTENT_FILTER_URI: Uri!
Deprecated: see android.provider.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
static valCONTENT_URI: Uri!
Deprecated: see android.provider.ContactsContract
The content:// style URL for this table
DELETED_CONTENT_URI
static valDELETED_CONTENT_URI: Uri!
Deprecated: see android.provider.ContactsContract
The content:// style URL for the table that holds the deleted contacts.