to top
Android APIs
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
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.

Summary

[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
Fields
public static final Uri CONTENT_FILTER_URI The content:// style URI for this table.
[Expand]
Inherited Methods
From class java.lang.Object

Fields

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));