AggregationSuggestions
class AggregationSuggestions : BaseColumns, ContactsContract.ContactOptionsColumns, ContactsContract.ContactStatusColumns, ContactsContract.ContactsColumns
A read-only sub-directory of a single contact aggregate that contains all aggregation suggestions (other contacts). The aggregation suggestions are computed based on approximate data matches with this contact.
Note: this query may be expensive! If you need to use it in bulk, make sure the user experience is acceptable when the query runs for a long time.
Usage example:
Uri uri = Contacts.CONTENT_URI.buildUpon()
.appendEncodedPath(String.valueOf(contactId))
.appendPath(Contacts.AggregationSuggestions.CONTENT_DIRECTORY)
.appendQueryParameter("limit", "3")
.build()
Cursor cursor = getContentResolver().query(suggestionsUri,
new String[] {Contacts.DISPLAY_NAME, Contacts._ID, Contacts.LOOKUP_KEY},
null, null, null);
This directory can be used either with a CONTENT_URI
or CONTENT_LOOKUP_URI
.
Summary
Nested classes |
|
A convenience builder for aggregation suggestion content URIs.
|
Constants |
static String |
The directory twig for this sub-table.
|
Inherited constants |
|
From class ContactsColumns
String |
CONTACT_LAST_UPDATED_TIMESTAMP
Timestamp (milliseconds since epoch) of when this contact was last updated. This includes updates to all data associated with this contact including raw contacts. Any modification (including deletes and inserts) of underlying contact data are also reflected in this timestamp.
|
String |
DISPLAY_NAME
The display name for the contact.
Type: TEXT
|
String |
HAS_PHONE_NUMBER
An indicator of whether this contact has at least one phone number. "1" if there is at least one phone number, "0" otherwise.
Type: INTEGER
|
String |
IN_DEFAULT_DIRECTORY
Flag that reflects whether the contact exists inside the default directory. Ie, whether the contact is designed to only be visible outside search.
|
String |
IN_VISIBLE_GROUP
Flag that reflects the Groups.GROUP_VISIBLE state of any CommonDataKinds.GroupMembership for this contact.
|
String |
IS_USER_PROFILE
Flag that reflects whether this contact represents the user's personal profile entry.
|
String |
LOOKUP_KEY
An opaque value that contains hints on how to find the contact if its row id changed as a result of a sync or aggregation.
|
String |
NAME_RAW_CONTACT_ID
Reference to the row in the RawContacts table holding the contact name.
Type: INTEGER REFERENCES raw_contacts(_id)
|
String |
PHOTO_FILE_ID
Photo file ID of the full-size photo. If present, this will be used to populate PHOTO_URI . The ID can also be used with ContactsContract.DisplayPhoto.CONTENT_URI to create a URI to the photo. If this is present, PHOTO_ID is also guaranteed to be populated.
Type: INTEGER
|
String |
PHOTO_ID
Reference to the row in the data table holding the photo. A photo can be referred to either by ID (this field) or by URI (see PHOTO_THUMBNAIL_URI and PHOTO_URI ). If PHOTO_ID is null, consult PHOTO_URI or PHOTO_THUMBNAIL_URI , which is a more generic mechanism for referencing the contact photo, especially for contacts returned by non-local directories (see Directory ).
Type: INTEGER REFERENCES data(_id)
|
String |
PHOTO_THUMBNAIL_URI
A URI that can be used to retrieve a thumbnail of the contact's photo. A photo can be referred to either by a URI (this field or PHOTO_URI ) or by ID (see PHOTO_ID ). If PHOTO_ID is not null, PHOTO_URI and PHOTO_THUMBNAIL_URI shall not be null (but not necessarily vice versa). If the content provider does not differentiate between full-size photos and thumbnail photos, PHOTO_THUMBNAIL_URI and PHOTO_URI can contain the same value, but either both shall be null or both not null.
Type: TEXT
|
String |
PHOTO_URI
A URI that can be used to retrieve the contact's full-size photo. If PHOTO_FILE_ID is not null, this will be populated with a URI based off ContactsContract.DisplayPhoto.CONTENT_URI . Otherwise, this will be populated with the same value as PHOTO_THUMBNAIL_URI . A photo can be referred to either by a URI (this field) or by ID (see PHOTO_ID ). If either PHOTO_FILE_ID or PHOTO_ID is not null, PHOTO_URI and PHOTO_THUMBNAIL_URI shall not be null (but not necessarily vice versa). Thus using PHOTO_URI is a more robust method of retrieving contact photos.
Type: TEXT
|
|
From class ContactOptionsColumns
String |
CUSTOM_RINGTONE
URI for a custom ringtone associated with the contact. If null or missing, the default ringtone is used.
Type: TEXT (URI to the ringtone)
|
String |
LAST_TIME_CONTACTED
The last time a contact was contacted.
Caution: If you publish your app to the Google Play Store, this field is obsolete, regardless of Android version. For more information, see the Contacts Provider page.
Type: INTEGER
|
String |
PINNED
The position at which the contact is pinned. If PinnedPositions.UNPINNED , the contact is not pinned. Also see PinnedPositions .
Type: INTEGER
|
String |
SEND_TO_VOICEMAIL
Whether the contact should always be sent to voicemail. If missing, defaults to false.
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 contact has been contacted.
Caution: If you publish your app to the Google Play Store, this field is obsolete, regardless of Android version. For more information, see the Contacts Provider page.
Type: INTEGER
|
|
|
Constants