java.lang.Object | |
↳ | android.provider.ContactsContract.PhoneLookup |
A table that represents the result of looking up a phone number, for
example for caller ID. To perform a lookup you must append the number you
want to find to 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 | NUMBER |
read-only | Phone number. |
String | TYPE |
read-only | Phone number type. See ContactsContract.CommonDataKinds.Phone . |
String | LABEL |
read-only | Custom label for the phone number. See ContactsContract.CommonDataKinds.Phone . |
Columns from the Contacts table are also available through a join.
Join with Contacts |
|||
---|---|---|---|
long | _ID |
read-only | Contact ID. |
String | LOOKUP_KEY |
read-only | See ContactsContract.Contacts |
String | DISPLAY_NAME |
read-only | See ContactsContract.Contacts |
long | PHOTO_ID |
read-only | See ContactsContract.Contacts . |
int | IN_VISIBLE_GROUP |
read-only | See ContactsContract.Contacts . |
int | HAS_PHONE_NUMBER |
read-only | See ContactsContract.Contacts . |
int | TIMES_CONTACTED |
read-only | See ContactsContract.Contacts . |
long | LAST_TIME_CONTACTED |
read-only | See ContactsContract.Contacts . |
int | STARRED |
read-only | See ContactsContract.Contacts . |
String | CUSTOM_RINGTONE |
read-only | See ContactsContract.Contacts . |
int | SEND_TO_VOICEMAIL |
read-only | See ContactsContract.Contacts . |
Constants | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
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. |
[Expand]
Inherited Constants | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From interface
android.provider.BaseColumns
| |||||||||||
From interface
android.provider.ContactsContract.PhoneLookupColumns
| |||||||||||
From interface
android.provider.ContactsContract.ContactsColumns
| |||||||||||
From interface
android.provider.ContactsContract.ContactOptionsColumns
|
Fields | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
CONTENT_FILTER_URI | The content:// style URI for this table. | ||||||||||
ENTERPRISE_CONTENT_FILTER_URI | URI used for the "enterprise caller-id". |
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.lang.Object
|
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.
The content:// style URI for this table. Append the phone number you want to lookup to this URI and query it to perform a lookup. For example:
Uri lookupUri = Uri.withAppendedPath(PhoneLookup.CONTENT_FILTER_URI, Uri.encode(phoneNumber));
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:
PHOTO_THUMBNAIL_URI
and PHOTO_URI
will be rewritten to special
URIs. Use openAssetFileDescriptor(Uri, String)
or its siblings to
load pictures from them.
PHOTO_ID
and PHOTO_FILE_ID
will be set to null. Do not use them.
_ID
s. In order to tell whether a contact
is from the corp profile, use
isEnterpriseContactId(long)
.
This URI does NOT support selection nor order-by.
Uri lookupUri = Uri.withAppendedPath(PhoneLookup.ENTERPRISE_CONTENT_FILTER_URI, Uri.encode(phoneNumber));