java.lang.Object
   ↳android.provider.ContactsContract.PhoneLookup

Class Overview

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,...
 

Columns

PhoneLookup
long_IDread-onlyData row ID.
StringNUMBERread-onlyPhone number.
StringTYPEread-onlyPhone number type. See ContactsContract.CommonDataKinds.Phone.
StringLABELread-onlyCustom label for the phone number. See ContactsContract.CommonDataKinds.Phone.

Columns from the Contacts table are also available through a join.

Join with Contacts
StringLOOKUP_KEYread-onlySee ContactsContract.Contacts
StringDISPLAY_NAMEread-onlySee ContactsContract.Contacts
longPHOTO_IDread-onlySee ContactsContract.Contacts.
intIN_VISIBLE_GROUPread-onlySee ContactsContract.Contacts.
intHAS_PHONE_NUMBERread-onlySee ContactsContract.Contacts.
intTIMES_CONTACTEDread-onlySee ContactsContract.Contacts.
longLAST_TIME_CONTACTEDread-onlySee ContactsContract.Contacts.
intSTARREDread-onlySee ContactsContract.Contacts.
StringCUSTOM_RINGTONEread-onlySee ContactsContract.Contacts.
intSEND_TO_VOICEMAILread-onlySee ContactsContract.Contacts.

Summary

Constants
UriCONTENT_FILTER_URIThe content:// style URI for this table.
[Expand]
Inherited Constants
From interface android.provider.BaseColumns
From interface android.provider.ContactsContract.ContactOptionsColumns
From interface android.provider.ContactsContract.ContactsColumns
From interface android.provider.ContactsContract.PhoneLookupColumns
[Expand]
Inherited Methods
From class java.lang.Object

Constants

public static final Uri CONTENT_FILTER_URI

Since: API Level 5

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_URI, Uri.encode(phoneNumber));