# Contacts.Intents

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

# Intents

*** ** * ** ***

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

```
class Intents
```

|---|------------------------------------------------------------------------------------------------------------------------|
| [kotlin.Any](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html)                                         ||
| ↳ | [android.provider.Contacts.Intents](https://developer.android.com/reference/kotlin/android/provider/Contacts.Intents#) |

*** ** * ** ***

| **This class was deprecated in API level 5.**
|
| see[android.provider.ContactsContract](https://developer.android.com/reference/kotlin/android/provider/ContactsContract)

Contains helper classes used to create or manage[Intents](https://developer.android.com/reference/kotlin/android/content/Intent.html#)that involve contacts.

## Summary

|                                                                                                                           Nested classes                                                                                                                            ||
|---|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|   | [Insert](https://developer.android.com/reference/kotlin/android/provider/Contacts.Intents.Insert) Convenience class that contains string constants used to create contact[Intents](https://developer.android.com/reference/kotlin/android/content/Intent.html#). |
|   | [UI](https://developer.android.com/reference/kotlin/android/provider/Contacts.Intents.UI) Intents related to the Contacts app UI.                                                                                                                                |

|                                                                                                                                                                                                                                             Constants                                                                                                                                                                                                                                             ||
|----------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| static[String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) | [ATTACH_IMAGE](https://developer.android.com/reference/kotlin/android/provider/Contacts.Intents#ATTACH_IMAGE:kotlin.String) Starts an Activity that lets the user pick a contact to attach an image to.                                                                                                                                                                                                   |
| static[String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) | [EXTRA_CREATE_DESCRIPTION](https://developer.android.com/reference/kotlin/android/provider/Contacts.Intents#EXTRA_CREATE_DESCRIPTION:kotlin.String) Used with[SHOW_OR_CREATE_CONTACT](https://developer.android.com/reference/kotlin/android/provider/Contacts.Intents#SHOW_OR_CREATE_CONTACT:kotlin.String)to specify an exact description to be shown when prompting user about creating a new contact. |
| static[String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) | [EXTRA_FORCE_CREATE](https://developer.android.com/reference/kotlin/android/provider/Contacts.Intents#EXTRA_FORCE_CREATE:kotlin.String) Used with[SHOW_OR_CREATE_CONTACT](https://developer.android.com/reference/kotlin/android/provider/Contacts.Intents#SHOW_OR_CREATE_CONTACT:kotlin.String)to force creating a new contact if no matching contact found.                                             |
| static[String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) | [SEARCH_SUGGESTION_CLICKED](https://developer.android.com/reference/kotlin/android/provider/Contacts.Intents#SEARCH_SUGGESTION_CLICKED:kotlin.String) This is the intent that is fired when a search suggestion is clicked on.                                                                                                                                                                            |
| static[String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) | [SEARCH_SUGGESTION_CREATE_CONTACT_CLICKED](https://developer.android.com/reference/kotlin/android/provider/Contacts.Intents#SEARCH_SUGGESTION_CREATE_CONTACT_CLICKED:kotlin.String) This is the intent that is fired when a search suggestion for creating a contact is clicked on.                                                                                                                       |
| static[String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) | [SEARCH_SUGGESTION_DIAL_NUMBER_CLICKED](https://developer.android.com/reference/kotlin/android/provider/Contacts.Intents#SEARCH_SUGGESTION_DIAL_NUMBER_CLICKED:kotlin.String) This is the intent that is fired when a search suggestion for dialing a number is clicked on.                                                                                                                               |
| static[String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) | [SHOW_OR_CREATE_CONTACT](https://developer.android.com/reference/kotlin/android/provider/Contacts.Intents#SHOW_OR_CREATE_CONTACT:kotlin.String) Takes as input a data URI with a mailto: or tel: scheme.                                                                                                                                                                                                  |

|                                                 Public constructors                                                 ||
|------------------------------------------------------------------------------------------------------------------|---|
| [Intents](https://developer.android.com/reference/kotlin/android/provider/Contacts.Intents#Intents())`()` <br /> |

## Constants

### ATTACH_IMAGE

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

```
static val ATTACH_IMAGE: String
```

**Deprecated:** *see[android.provider.ContactsContract](https://developer.android.com/reference/kotlin/android/provider/ContactsContract)*

Starts an Activity that lets the user pick a contact to attach an image to. After picking the contact it launches the image cropper in face detection mode.  

    Value: "com.android.contacts.action.ATTACH_IMAGE"

### EXTRA_CREATE_DESCRIPTION

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

```
static val EXTRA_CREATE_DESCRIPTION: String
```

**Deprecated:** *see[android.provider.ContactsContract](https://developer.android.com/reference/kotlin/android/provider/ContactsContract)*

Used with[SHOW_OR_CREATE_CONTACT](https://developer.android.com/reference/kotlin/android/provider/Contacts.Intents#SHOW_OR_CREATE_CONTACT:kotlin.String)to specify an exact description to be shown when prompting user about creating a new contact.

Type: STRING  

    Value: "com.android.contacts.action.CREATE_DESCRIPTION"

### EXTRA_FORCE_CREATE

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

```
static val EXTRA_FORCE_CREATE: String
```

**Deprecated:** *see[android.provider.ContactsContract](https://developer.android.com/reference/kotlin/android/provider/ContactsContract)*

Used with[SHOW_OR_CREATE_CONTACT](https://developer.android.com/reference/kotlin/android/provider/Contacts.Intents#SHOW_OR_CREATE_CONTACT:kotlin.String)to force creating a new contact if no matching contact found. Otherwise, default behavior is to prompt user with dialog before creating.

Type: BOOLEAN  

    Value: "com.android.contacts.action.FORCE_CREATE"

### SEARCH_SUGGESTION_CLICKED

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

```
static val SEARCH_SUGGESTION_CLICKED: String
```

**Deprecated:** *see[android.provider.ContactsContract](https://developer.android.com/reference/kotlin/android/provider/ContactsContract)*

This is the intent that is fired when a search suggestion is clicked on.  

    Value: "android.provider.Contacts.SEARCH_SUGGESTION_CLICKED"

### SEARCH_SUGGESTION_CREATE_CONTACT_CLICKED

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

```
static val SEARCH_SUGGESTION_CREATE_CONTACT_CLICKED: String
```

**Deprecated:** *see[android.provider.ContactsContract](https://developer.android.com/reference/kotlin/android/provider/ContactsContract)*

This is the intent that is fired when a search suggestion for creating a contact is clicked on.  

    Value: "android.provider.Contacts.SEARCH_SUGGESTION_CREATE_CONTACT_CLICKED"

### SEARCH_SUGGESTION_DIAL_NUMBER_CLICKED

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

```
static val SEARCH_SUGGESTION_DIAL_NUMBER_CLICKED: String
```

**Deprecated:** *see[android.provider.ContactsContract](https://developer.android.com/reference/kotlin/android/provider/ContactsContract)*

This is the intent that is fired when a search suggestion for dialing a number is clicked on.  

    Value: "android.provider.Contacts.SEARCH_SUGGESTION_DIAL_NUMBER_CLICKED"

### SHOW_OR_CREATE_CONTACT

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

```
static val SHOW_OR_CREATE_CONTACT: String
```

**Deprecated:** *see[android.provider.ContactsContract](https://developer.android.com/reference/kotlin/android/provider/ContactsContract)*

Takes as input a data URI with a mailto: or tel: scheme. If a single contact exists with the given data it will be shown. If no contact exists, a dialog will ask the user if they want to create a new contact with the provided details filled in. If multiple contacts share the data the user will be prompted to pick which contact they want to view.

For`mailto:`URIs, the scheme specific portion must be a raw email address, such as one built using[Uri.fromParts(String, String, String)](https://developer.android.com/reference/kotlin/android/net/Uri.html#fromParts(kotlin.String,%20kotlin.String,%20kotlin.String)).

For`tel:`URIs, the scheme specific portion is compared to existing numbers using the standard caller ID lookup algorithm. The number must be properly encoded, for example using[Uri.fromParts(String, String, String)](https://developer.android.com/reference/kotlin/android/net/Uri.html#fromParts(kotlin.String,%20kotlin.String,%20kotlin.String)).

Any extras from the[Insert](https://developer.android.com/reference/kotlin/android/provider/Contacts.Intents.Insert)class will be passed along to the create activity if there are no contacts to show.

Passing true for the[EXTRA_FORCE_CREATE](https://developer.android.com/reference/kotlin/android/provider/Contacts.Intents#EXTRA_FORCE_CREATE:kotlin.String)extra will skip prompting the user when the contact doesn't exist.  

    Value: "com.android.contacts.action.SHOW_OR_CREATE_CONTACT"

## Public constructors

### Intents

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

```
Intents()
```

**Deprecated:** *see[android.provider.ContactsContract](https://developer.android.com/reference/kotlin/android/provider/ContactsContract)*