public static final class ContactsContract.PhoneLookup extends Object implements BaseColumns, ContactsContract.PhoneLookupColumns, ContactsContract.ContactsColumns, ContactsContract.ContactOptionsColumns
CONTENT_FILTER_URI
. This query is highly
optimized.
Uri uri = Uri.withAppendedPath(PhoneLookup.CONTENT_FILTER_URI, Uri.encode(phoneNumber)); resolver.query(uri, new String[]{PhoneLookup.DISPLAY_NAME,...
PhoneLookup | |||
---|---|---|---|
String | ContactsContract.PhoneLookupColumns.NUMBER |
read-only | Phone number. |
String | ContactsContract.PhoneLookupColumns.TYPE |
read-only | Phone number type. See ContactsContract.CommonDataKinds.Phone . |
String | ContactsContract.PhoneLookupColumns.LABEL |
read-only | Custom label for the phone number. See ContactsContract.CommonDataKinds.Phone . |
Columns from the Contacts table are also available through a join.
Modifier and Type | Field and Description |
---|---|
static Uri |
CONTENT_FILTER_URI
The content:// style URI for this table.
|
static String |
CONTENT_TYPE
The MIME type of
CONTENT_FILTER_URI providing a directory of phone lookup rows. |
static Uri |
ENTERPRISE_CONTENT_FILTER_URI
URI used for the "enterprise caller-id".
|
static String |
QUERY_PARAMETER_SIP_ADDRESS
If this boolean parameter is set to true, then the appended query is treated as a
SIP address and the lookup will be performed against SIP addresses in the user's
contacts.
|
_COUNT, _ID
CONTACT_ID, DATA_ID, LABEL, NORMALIZED_NUMBER, NUMBER, TYPE
CONTACT_LAST_UPDATED_TIMESTAMP, DISPLAY_NAME, HAS_PHONE_NUMBER, IN_DEFAULT_DIRECTORY, IN_VISIBLE_GROUP, IS_USER_PROFILE, LOOKUP_KEY, NAME_RAW_CONTACT_ID, PHOTO_FILE_ID, PHOTO_ID, PHOTO_THUMBNAIL_URI, PHOTO_URI
CUSTOM_RINGTONE, LAST_TIME_CONTACTED, PINNED, SEND_TO_VOICEMAIL, STARRED, TIMES_CONTACTED
public static final Uri CONTENT_FILTER_URI
Uri lookupUri = Uri.withAppendedPath(PhoneLookup.CONTENT_FILTER_URI, Uri.encode(phoneNumber));
public static final Uri ENTERPRISE_CONTENT_FILTER_URI
URI used for the "enterprise caller-id".
It supports the same semantics as CONTENT_FILTER_URI
and returns the same
columns. If the device has no corp profile that is linked to the current profile, it
behaves in the exact same way as CONTENT_FILTER_URI
. If there is a corp profile
linked to the current profile, it first queries against the personal contact database,
and if no matching contacts are found there, then queries against the
corp contacts database.
If a result is from the corp profile, it makes the following changes to the data:
ContactsContract.ContactsColumns.PHOTO_THUMBNAIL_URI
and ContactsContract.ContactsColumns.PHOTO_URI
will be rewritten to special
URIs. Use ContentResolver.openAssetFileDescriptor(android.net.Uri, java.lang.String)
or its siblings to
load pictures from them.
ContactsContract.ContactsColumns.PHOTO_ID
and ContactsContract.ContactsColumns.PHOTO_FILE_ID
will be set to null. Do not use them.
BaseColumns._ID
s. In order to tell whether a contact
is from the corp profile, use
ContactsContract.Contacts.isEnterpriseContactId(long)
.
ContactsContract.ContactsColumns.LOOKUP_KEY
s too.
A contact lookup URL built by
ContactsContract.Contacts.getLookupUri(long, String)
with an BaseColumns._ID
and a ContactsContract.ContactsColumns.LOOKUP_KEY
returned by this API can be passed to
ContactsContract.QuickContact.showQuickContact(android.content.Context, android.view.View, android.net.Uri, int, java.lang.String[])
even if a contact is from the
corp profile.
Uri lookupUri = Uri.withAppendedPath(PhoneLookup.ENTERPRISE_CONTENT_FILTER_URI, Uri.encode(phoneNumber));
public static final String CONTENT_TYPE
CONTENT_FILTER_URI
providing a directory of phone lookup rows.public static final String QUERY_PARAMETER_SIP_ADDRESS