# ContactsContract.PhoneLookup

Added in [API level 5](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)

# PhoneLookup

*** ** * ** ***

Kotlin \|[Java](https://developer.android.com/reference/android/provider/ContactsContract.PhoneLookup "View this page in Java")  

```
class PhoneLookup : BaseColumns, ContactsContract.ContactNameColumns, ContactsContract.ContactOptionsColumns, ContactsContract.ContactsColumns, ContactsContract.PhoneLookupColumns
```

|---|------------------------------------------------------------------------------------------------------------------------------------------------|
| [kotlin.Any](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html)                                                                 ||
| ↳ | [android.provider.ContactsContract.PhoneLookup](https://developer.android.com/reference/kotlin/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](https://developer.android.com/reference/kotlin/android/provider/ContactsContract.PhoneLookup#CONTENT_FILTER_URI:android.net.Uri). This query is highly optimized.  

```kotlin
Uri uri = Uri.withAppendedPath(PhoneLookup.CONTENT_FILTER_URI, Uri.encode(phoneNumber));
  resolver.query(uri, new String[]{PhoneLookup.DISPLAY_NAME,...
  
```

### Columns

|                                                                                                                                                          PhoneLookup                                                                                                                                                           ||||
|--------|------------------------------------------------------------------------------------------------------------------------------------|-----------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| String | [NUMBER](https://developer.android.com/reference/kotlin/android/provider/ContactsContract.PhoneLookupColumns#NUMBER:kotlin.String) | read-only | Phone number.                                                                                                                                                           |
| String | [TYPE](https://developer.android.com/reference/kotlin/android/provider/ContactsContract.PhoneLookupColumns#TYPE:kotlin.String)     | read-only | Phone number type. See [CommonDataKinds.Phone](https://developer.android.com/reference/kotlin/android/provider/ContactsContract.CommonDataKinds.Phone).                 |
| String | [LABEL](https://developer.android.com/reference/kotlin/android/provider/ContactsContract.PhoneLookupColumns#LABEL:kotlin.String)   | read-only | Custom label for the phone number. See [CommonDataKinds.Phone](https://developer.android.com/reference/kotlin/android/provider/ContactsContract.CommonDataKinds.Phone). |

<br />

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

|                                                                                               Join with [Contacts](https://developer.android.com/reference/kotlin/android/provider/ContactsContract.Contacts)                                                                                               ||||
|--------|-------------------------------------------------------------------------------------------------------------------------------------------------------------|-----------|-----------------------------------------------------------------------------------------------------------------------------|
| long   | [_ID](https://developer.android.com/reference/kotlin/android/provider/BaseColumns#_ID:kotlin.String)                                                        | read-only | Contact ID.                                                                                                                 |
| long   | [CONTACT_ID](https://developer.android.com/reference/kotlin/android/provider/ContactsContract.PhoneLookupColumns#CONTACT_ID:kotlin.String)                  | read-only | Contact ID.                                                                                                                 |
| long   | [DATA_ID](https://developer.android.com/reference/kotlin/android/provider/ContactsContract.PhoneLookupColumns#DATA_ID:kotlin.String)                        | read-only | Data ID.                                                                                                                    |
| String | [LOOKUP_KEY](https://developer.android.com/reference/kotlin/android/provider/ContactsContract.ContactsColumns#LOOKUP_KEY:kotlin.String)                     | read-only | See [ContactsContract.Contacts](https://developer.android.com/reference/kotlin/android/provider/ContactsContract.Contacts)  |
| String | [DISPLAY_NAME](https://developer.android.com/reference/kotlin/android/provider/ContactsContract.ContactsColumns#DISPLAY_NAME:kotlin.String)                 | read-only | See [ContactsContract.Contacts](https://developer.android.com/reference/kotlin/android/provider/ContactsContract.Contacts)  |
| long   | [PHOTO_ID](https://developer.android.com/reference/kotlin/android/provider/ContactsContract.ContactsColumns#PHOTO_ID:kotlin.String)                         | read-only | See [ContactsContract.Contacts](https://developer.android.com/reference/kotlin/android/provider/ContactsContract.Contacts). |
| int    | [IN_VISIBLE_GROUP](https://developer.android.com/reference/kotlin/android/provider/ContactsContract.ContactsColumns#IN_VISIBLE_GROUP:kotlin.String)         | read-only | See [ContactsContract.Contacts](https://developer.android.com/reference/kotlin/android/provider/ContactsContract.Contacts). |
| int    | [HAS_PHONE_NUMBER](https://developer.android.com/reference/kotlin/android/provider/ContactsContract.ContactsColumns#HAS_PHONE_NUMBER:kotlin.String)         | read-only | See [ContactsContract.Contacts](https://developer.android.com/reference/kotlin/android/provider/ContactsContract.Contacts). |
| int    | [STARRED](https://developer.android.com/reference/kotlin/android/provider/ContactsContract.ContactOptionsColumns#STARRED:kotlin.String)                     | read-only | See [ContactsContract.Contacts](https://developer.android.com/reference/kotlin/android/provider/ContactsContract.Contacts). |
| String | [CUSTOM_RINGTONE](https://developer.android.com/reference/kotlin/android/provider/ContactsContract.ContactOptionsColumns#CUSTOM_RINGTONE:kotlin.String)     | read-only | See [ContactsContract.Contacts](https://developer.android.com/reference/kotlin/android/provider/ContactsContract.Contacts). |
| int    | [SEND_TO_VOICEMAIL](https://developer.android.com/reference/kotlin/android/provider/ContactsContract.ContactOptionsColumns#SEND_TO_VOICEMAIL:kotlin.String) | read-only | See [ContactsContract.Contacts](https://developer.android.com/reference/kotlin/android/provider/ContactsContract.Contacts). |

## Summary

|                                                                                                                                                                                                                  Constants                                                                                                                                                                                                                  ||
|-----------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| static [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) | [QUERY_PARAMETER_SIP_ADDRESS](https://developer.android.com/reference/kotlin/android/provider/ContactsContract.PhoneLookup#QUERY_PARAMETER_SIP_ADDRESS:kotlin.String) 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. |

| Inherited constants ||
|---|---|
| From class [PhoneLookupColumns](https://developer.android.com/reference/kotlin/android/provider/ContactsContract.PhoneLookupColumns) |----------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) | [CONTACT_ID](https://developer.android.com/reference/kotlin/android/provider/ContactsContract.PhoneLookupColumns#CONTACT_ID:kotlin.String) A reference to the [ContactsContract.Contacts._ID](https://developer.android.com/reference/kotlin/android/provider/BaseColumns#_ID:kotlin.String) that this data belongs to. Type: INTEGER <br /> | | [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) | [DATA_ID](https://developer.android.com/reference/kotlin/android/provider/ContactsContract.PhoneLookupColumns#DATA_ID:kotlin.String) The ID of the data row. Type: INTEGER <br />                                                                                                                                                            | | [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) | [LABEL](https://developer.android.com/reference/kotlin/android/provider/ContactsContract.PhoneLookupColumns#LABEL:kotlin.String) The user defined label for the phone number. Type: TEXT <br />                                                                                                                                              | | [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) | [NORMALIZED_NUMBER](https://developer.android.com/reference/kotlin/android/provider/ContactsContract.PhoneLookupColumns#NORMALIZED_NUMBER:kotlin.String) The phone number's E164 representation. Type: TEXT <br />                                                                                                                           | | [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) | [NUMBER](https://developer.android.com/reference/kotlin/android/provider/ContactsContract.PhoneLookupColumns#NUMBER:kotlin.String) The phone number as the user entered it. Type: TEXT <br />                                                                                                                                                | | [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) | [TYPE](https://developer.android.com/reference/kotlin/android/provider/ContactsContract.PhoneLookupColumns#TYPE:kotlin.String) The type of phone number, for example Home or Work. Type: INTEGER <br />                                                                                                                                      | ||
| From class [ContactsColumns](https://developer.android.com/reference/kotlin/android/provider/ContactsContract.ContactsColumns) |----------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) | [CONTACT_LAST_UPDATED_TIMESTAMP](https://developer.android.com/reference/kotlin/android/provider/ContactsContract.ContactsColumns#CONTACT_LAST_UPDATED_TIMESTAMP:kotlin.String) 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. <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      | | [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) | [DISPLAY_NAME](https://developer.android.com/reference/kotlin/android/provider/ContactsContract.ContactsColumns#DISPLAY_NAME:kotlin.String) The display name for the contact. Type: TEXT <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  | | [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) | [HAS_PHONE_NUMBER](https://developer.android.com/reference/kotlin/android/provider/ContactsContract.ContactsColumns#HAS_PHONE_NUMBER:kotlin.String) 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 <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           | | [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) | [IN_DEFAULT_DIRECTORY](https://developer.android.com/reference/kotlin/android/provider/ContactsContract.ContactsColumns#IN_DEFAULT_DIRECTORY:kotlin.String) Flag that reflects whether the contact exists inside the default directory. Ie, whether the contact is designed to only be visible outside search. <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            | | [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) | [IN_VISIBLE_GROUP](https://developer.android.com/reference/kotlin/android/provider/ContactsContract.ContactsColumns#IN_VISIBLE_GROUP:kotlin.String) Flag that reflects the [Groups.GROUP_VISIBLE](https://developer.android.com/reference/kotlin/android/provider/ContactsContract.GroupsColumns#GROUP_VISIBLE:kotlin.String) state of any [CommonDataKinds.GroupMembership](https://developer.android.com/reference/kotlin/android/provider/ContactsContract.CommonDataKinds.GroupMembership) for this contact. <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          | | [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) | [IS_USER_PROFILE](https://developer.android.com/reference/kotlin/android/provider/ContactsContract.ContactsColumns#IS_USER_PROFILE:kotlin.String) Flag that reflects whether this contact represents the user's personal profile entry. <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   | | [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) | [LOOKUP_KEY](https://developer.android.com/reference/kotlin/android/provider/ContactsContract.ContactsColumns#LOOKUP_KEY:kotlin.String) 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. <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        | | [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) | [NAME_RAW_CONTACT_ID](https://developer.android.com/reference/kotlin/android/provider/ContactsContract.ContactsColumns#NAME_RAW_CONTACT_ID:kotlin.String) Reference to the row in the RawContacts table holding the contact name. Type: INTEGER REFERENCES raw_contacts(_id) <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              | | [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) | [PHOTO_FILE_ID](https://developer.android.com/reference/kotlin/android/provider/ContactsContract.ContactsColumns#PHOTO_FILE_ID:kotlin.String) Photo file ID of the full-size photo. If present, this will be used to populate [PHOTO_URI](https://developer.android.com/reference/kotlin/android/provider/ContactsContract.ContactsColumns#PHOTO_URI:kotlin.String). The ID can also be used with [ContactsContract.DisplayPhoto.CONTENT_URI](https://developer.android.com/reference/kotlin/android/provider/ContactsContract.DisplayPhoto#CONTENT_URI:android.net.Uri) to create a URI to the photo. If this is present, [PHOTO_ID](https://developer.android.com/reference/kotlin/android/provider/ContactsContract.ContactsColumns#PHOTO_ID:kotlin.String) is also guaranteed to be populated. Type: INTEGER <br />                                                                                                                                                                                                                                                                                                                                                                          | | [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) | [PHOTO_ID](https://developer.android.com/reference/kotlin/android/provider/ContactsContract.ContactsColumns#PHOTO_ID:kotlin.String) 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](https://developer.android.com/reference/kotlin/android/provider/ContactsContract.ContactsColumns#PHOTO_THUMBNAIL_URI:kotlin.String) and [PHOTO_URI](https://developer.android.com/reference/kotlin/android/provider/ContactsContract.ContactsColumns#PHOTO_URI:kotlin.String)). If PHOTO_ID is null, consult [PHOTO_URI](https://developer.android.com/reference/kotlin/android/provider/ContactsContract.ContactsColumns#PHOTO_URI:kotlin.String) or [PHOTO_THUMBNAIL_URI](https://developer.android.com/reference/kotlin/android/provider/ContactsContract.ContactsColumns#PHOTO_THUMBNAIL_URI:kotlin.String), which is a more generic mechanism for referencing the contact photo, especially for contacts returned by non-local directories (see [Directory](https://developer.android.com/reference/kotlin/android/provider/ContactsContract.Directory)). Type: INTEGER REFERENCES data(_id) <br /> | | [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) | [PHOTO_THUMBNAIL_URI](https://developer.android.com/reference/kotlin/android/provider/ContactsContract.ContactsColumns#PHOTO_THUMBNAIL_URI:kotlin.String) 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](https://developer.android.com/reference/kotlin/android/provider/ContactsContract.ContactsColumns#PHOTO_URI:kotlin.String)) or by ID (see [PHOTO_ID](https://developer.android.com/reference/kotlin/android/provider/ContactsContract.ContactsColumns#PHOTO_ID:kotlin.String)). 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](https://developer.android.com/reference/kotlin/android/provider/ContactsContract.ContactsColumns#PHOTO_URI:kotlin.String) can contain the same value, but either both shall be null or both not null. Type: TEXT <br />                                                                                                                                   | | [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) | [PHOTO_URI](https://developer.android.com/reference/kotlin/android/provider/ContactsContract.ContactsColumns#PHOTO_URI:kotlin.String) 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](https://developer.android.com/reference/kotlin/android/provider/ContactsContract.DisplayPhoto#CONTENT_URI:android.net.Uri). Otherwise, this will be populated with the same value as [PHOTO_THUMBNAIL_URI](https://developer.android.com/reference/kotlin/android/provider/ContactsContract.ContactsColumns#PHOTO_THUMBNAIL_URI:kotlin.String). A photo can be referred to either by a URI (this field) or by ID (see [PHOTO_ID](https://developer.android.com/reference/kotlin/android/provider/ContactsContract.ContactsColumns#PHOTO_ID:kotlin.String)). 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 <br />                                                                    | ||
| From class [ContactOptionsColumns](https://developer.android.com/reference/kotlin/android/provider/ContactsContract.ContactOptionsColumns) |----------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) | [CUSTOM_RINGTONE](https://developer.android.com/reference/kotlin/android/provider/ContactsContract.ContactOptionsColumns#CUSTOM_RINGTONE:kotlin.String) URI for a custom ringtone associated with the contact. If null or missing, the default ringtone is used. Type: TEXT (URI to the ringtone) <br />                                                                                                                                                                                                              | | [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) | [LAST_TIME_CONTACTED](https://developer.android.com/reference/kotlin/android/provider/ContactsContract.ContactOptionsColumns#LAST_TIME_CONTACTED:kotlin.String) 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](https://developer.android.com/reference/kotlin/guide/topics/providers/contacts-provider#ObsoleteData) page. Type: INTEGER <br />       | | [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) | [PINNED](https://developer.android.com/reference/kotlin/android/provider/ContactsContract.ContactOptionsColumns#PINNED:kotlin.String) The position at which the contact is pinned. If [PinnedPositions.UNPINNED](https://developer.android.com/reference/kotlin/android/provider/ContactsContract.PinnedPositions#UNPINNED:kotlin.Int), the contact is not pinned. Also see [PinnedPositions](https://developer.android.com/reference/kotlin/android/provider/ContactsContract.PinnedPositions). Type: INTEGER <br /> | | [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) | [SEND_TO_VOICEMAIL](https://developer.android.com/reference/kotlin/android/provider/ContactsContract.ContactOptionsColumns#SEND_TO_VOICEMAIL:kotlin.String) Whether the contact should always be sent to voicemail. If missing, defaults to false. Type: INTEGER (0 for false, 1 for true) <br />                                                                                                                                                                                                                     | | [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) | [STARRED](https://developer.android.com/reference/kotlin/android/provider/ContactsContract.ContactOptionsColumns#STARRED:kotlin.String) Is the contact starred? Type: INTEGER (boolean) <br />                                                                                                                                                                                                                                                                                                                        | | [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) | [TIMES_CONTACTED](https://developer.android.com/reference/kotlin/android/provider/ContactsContract.ContactOptionsColumns#TIMES_CONTACTED:kotlin.String) 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](https://developer.android.com/reference/kotlin/guide/topics/providers/contacts-provider#ObsoleteData) page. Type: INTEGER <br />    | ||
| From class [ContactNameColumns](https://developer.android.com/reference/kotlin/android/provider/ContactsContract.ContactNameColumns) |----------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) | [DISPLAY_NAME_ALTERNATIVE](https://developer.android.com/reference/kotlin/android/provider/ContactsContract.ContactNameColumns#DISPLAY_NAME_ALTERNATIVE:kotlin.String) An alternative representation of the display name, such as "family name first" instead of "given name first" for Western names. If an alternative is not available, the values should be the same as [DISPLAY_NAME_PRIMARY](https://developer.android.com/reference/kotlin/android/provider/ContactsContract.ContactNameColumns#DISPLAY_NAME_PRIMARY:kotlin.String). A contacts provider is free to provide alternatives as necessary for its target market. For example the default Android Open Source Project contacts provider currently provides an alternative in a single case: if the display name is based on the structured name and the structured name follows the Western full name style, then the field contains the "family name first" version of the full name. Other cases may be added later. <br /> | | [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) | [DISPLAY_NAME_PRIMARY](https://developer.android.com/reference/kotlin/android/provider/ContactsContract.ContactNameColumns#DISPLAY_NAME_PRIMARY:kotlin.String) The standard text shown as the contact's display name, based on the best available information for the contact (for example, it might be the email address if the name is not available). The information actually used to compute the name is stored in [DISPLAY_NAME_SOURCE](https://developer.android.com/reference/kotlin/android/provider/ContactsContract.ContactNameColumns#DISPLAY_NAME_SOURCE:kotlin.String). A contacts provider is free to choose whatever representation makes most sense for its target market. For example in the default Android Open Source Project implementation, if the display name is based on the structured name and the structured name follows the Western full-name style, then this field contains the "given name first" version of the full name. <br /> <br />                     | | [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) | [DISPLAY_NAME_SOURCE](https://developer.android.com/reference/kotlin/android/provider/ContactsContract.ContactNameColumns#DISPLAY_NAME_SOURCE:kotlin.String) The kind of data that is used as the display name for the contact, such as structured name or email address. See [DisplayNameSources](https://developer.android.com/reference/kotlin/android/provider/ContactsContract.DisplayNameSources). <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 | | [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) | [PHONETIC_NAME](https://developer.android.com/reference/kotlin/android/provider/ContactsContract.ContactNameColumns#PHONETIC_NAME:kotlin.String) Pronunciation of the full name in the phonetic alphabet specified by [PHONETIC_NAME_STYLE](https://developer.android.com/reference/kotlin/android/provider/ContactsContract.ContactNameColumns#PHONETIC_NAME_STYLE:kotlin.String). The value may be set manually by the user. This capability is of interest only in countries with commonly used phonetic alphabets, such as Japan and Korea. See [PhoneticNameStyle](https://developer.android.com/reference/kotlin/android/provider/ContactsContract.PhoneticNameStyle). <br />                                                                                                                                                                                                                                                                                                             | | [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) | [PHONETIC_NAME_STYLE](https://developer.android.com/reference/kotlin/android/provider/ContactsContract.ContactNameColumns#PHONETIC_NAME_STYLE:kotlin.String) The phonetic alphabet used to represent the [PHONETIC_NAME](https://developer.android.com/reference/kotlin/android/provider/ContactsContract.ContactNameColumns#PHONETIC_NAME:kotlin.String). See [PhoneticNameStyle](https://developer.android.com/reference/kotlin/android/provider/ContactsContract.PhoneticNameStyle). <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  | | [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) | [SORT_KEY_ALTERNATIVE](https://developer.android.com/reference/kotlin/android/provider/ContactsContract.ContactNameColumns#SORT_KEY_ALTERNATIVE:kotlin.String) Sort key based on the alternative representation of the full name, [DISPLAY_NAME_ALTERNATIVE](https://developer.android.com/reference/kotlin/android/provider/ContactsContract.ContactNameColumns#DISPLAY_NAME_ALTERNATIVE:kotlin.String). Thus for Western names, it is the one using the "family name first" format. <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    | | [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) | [SORT_KEY_PRIMARY](https://developer.android.com/reference/kotlin/android/provider/ContactsContract.ContactNameColumns#SORT_KEY_PRIMARY:kotlin.String) Sort key that takes into account locale-based traditions for sorting names in address books. The default sort key is [DISPLAY_NAME_PRIMARY](https://developer.android.com/reference/kotlin/android/provider/ContactsContract.ContactNameColumns#DISPLAY_NAME_PRIMARY:kotlin.String). For Chinese names the sort key is the name's Pinyin spelling, and for Japanese names it is the Hiragana version of the phonetic name. <br />                                                                                                                                                                                                                                                                                                                                                                                                        | ||
| From class [BaseColumns](https://developer.android.com/reference/kotlin/android/provider/BaseColumns) |----------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------| | [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) | [_COUNT](https://developer.android.com/reference/kotlin/android/provider/BaseColumns#_COUNT:kotlin.String) The count of rows in a directory. Type: INTEGER <br /> | | [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) | [_ID](https://developer.android.com/reference/kotlin/android/provider/BaseColumns#_ID:kotlin.String) The unique ID for a row. Type: INTEGER (long) <br />         | ||

|                                                                                                                                                                                                    Properties                                                                                                                                                                                                     ||
|-------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| static [Uri](https://developer.android.com/reference/kotlin/android/net/Uri.html#)! | [CONTENT_FILTER_URI](https://developer.android.com/reference/kotlin/android/provider/ContactsContract.PhoneLookup#CONTENT_FILTER_URI:android.net.Uri) The content:// style URI for this table.                                                                                                                               |
| static [Uri](https://developer.android.com/reference/kotlin/android/net/Uri.html#)! | [ENTERPRISE_CONTENT_FILTER_URI](https://developer.android.com/reference/kotlin/android/provider/ContactsContract.PhoneLookup#ENTERPRISE_CONTENT_FILTER_URI:android.net.Uri) URI used for looking up contacts by phone number on the contact databases of both the calling user and the managed profile that is linked to it. |

## Constants

### QUERY_PARAMETER_SIP_ADDRESS

Added in [API level 21](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)  

```
static val QUERY_PARAMETER_SIP_ADDRESS: String
```

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.  

    Value: "sip"

## Properties

### CONTENT_FILTER_URI

Added in [API level 5](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)  

```
static val CONTENT_FILTER_URI: Uri!
```

The content:// style URI for this table.

**Caution:** If you publish your app to the Google Play Store, this field doesn't sort results based on contacts frequency. For more information, see the [Contacts Provider](https://developer.android.com/reference/kotlin/guide/topics/providers/contacts-provider#ObsoleteData) page. Append the phone number you want to lookup to this URI and query it to perform a lookup. For example:  

```kotlin
Uri lookupUri = Uri.withAppendedPath(PhoneLookup.CONTENT_FILTER_URI,
          Uri.encode(phoneNumber));
  
```  

### ENTERPRISE_CONTENT_FILTER_URI

Added in [API level 21](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)  

```
static val ENTERPRISE_CONTENT_FILTER_URI: Uri!
```

URI used for looking up contacts by phone number on the contact databases of both the calling user and the managed profile that is linked to it.

It supports the same semantics as [CONTENT_FILTER_URI](https://developer.android.com/reference/kotlin/android/provider/ContactsContract.PhoneLookup#CONTENT_FILTER_URI:android.net.Uri) and returns the same columns.  
If the device has no managed profile that is linked to the calling user, it behaves in the exact same way as [CONTENT_FILTER_URI](https://developer.android.com/reference/kotlin/android/provider/ContactsContract.PhoneLookup#CONTENT_FILTER_URI:android.net.Uri).  
If there is a managed profile linked to the calling user, it first queries the calling user's contact database, and only if no matching contacts are found there it then queries the managed profile database.

**Caution:** If you publish your app to the Google Play Store, this field doesn't sort results based on contacts frequency. For more information, see the [Contacts Provider](https://developer.android.com/reference/kotlin/guide/topics/providers/contacts-provider#ObsoleteData) page.

If a result is from the managed profile, the following changes are made to the data:

- [PHOTO_THUMBNAIL_URI](https://developer.android.com/reference/kotlin/android/provider/ContactsContract.ContactsColumns#PHOTO_THUMBNAIL_URI:kotlin.String) and [PHOTO_URI](https://developer.android.com/reference/kotlin/android/provider/ContactsContract.ContactsColumns#PHOTO_URI:kotlin.String) will be rewritten to special URIs. Use android.content.ContentResolver#openAssetFileDescriptor or its siblings to load pictures from them.
- [PHOTO_ID](https://developer.android.com/reference/kotlin/android/provider/ContactsContract.ContactsColumns#PHOTO_ID:kotlin.String) and [PHOTO_FILE_ID](https://developer.android.com/reference/kotlin/android/provider/ContactsContract.ContactsColumns#PHOTO_FILE_ID:kotlin.String) will be set to null. Don't use them.
- [CONTACT_ID](https://developer.android.com/reference/kotlin/android/provider/ContactsContract.PhoneLookupColumns#CONTACT_ID:kotlin.String) and [LOOKUP_KEY](https://developer.android.com/reference/kotlin/android/provider/ContactsContract.ContactsColumns#LOOKUP_KEY:kotlin.String) will be replaced with artificial values. These values will be consistent across multiple queries, but do not use them in places that do not explicitly say they accept them. If they are used in the `selection` param in android.content.ContentProvider#query, the result is undefined.
- In order to tell whether a contact is from the managed profile, use [ContactsContract.Contacts.isEnterpriseContactId(long)](https://developer.android.com/reference/kotlin/android/provider/ContactsContract.Contacts#isEnterpriseContactId(kotlin.Long)).

  A contact lookup URL built by [ContactsContract.Contacts.getLookupUri(long, String)](https://developer.android.com/reference/kotlin/android/provider/ContactsContract.Contacts#getLookupUri(kotlin.Long,%20kotlin.String)) with a [CONTACT_ID](https://developer.android.com/reference/kotlin/android/provider/ContactsContract.PhoneLookupColumns#CONTACT_ID:kotlin.String) and a [LOOKUP_KEY](https://developer.android.com/reference/kotlin/android/provider/ContactsContract.ContactsColumns#LOOKUP_KEY:kotlin.String) returned by this API can be passed to android.provider.ContactsContract.QuickContact#showQuickContact even if a contact is from the managed profile.  

  ```kotlin
  Uri lookupUri = Uri.withAppendedPath(PhoneLookup.ENTERPRISE_CONTENT_FILTER_URI,
            Uri.encode(phoneNumber));
  ```