Added in [API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels) Summary: [Constants](https://developer.android.com/reference/android/provider/ContactsContract.Directory#constants) \| [Inherited Constants](https://developer.android.com/reference/android/provider/ContactsContract.Directory#inhconstants) \| [Fields](https://developer.android.com/reference/android/provider/ContactsContract.Directory#lfields) \| [Methods](https://developer.android.com/reference/android/provider/ContactsContract.Directory#pubmethods) \| [Inherited Methods](https://developer.android.com/reference/android/provider/ContactsContract.Directory#inhmethods)

# ContactsContract.Directory

*** ** * ** ***

` public static final class ContactsContract.Directory `   
` extends https://developer.android.com/reference/java/lang/Object ` ` implements https://developer.android.com/reference/android/provider/BaseColumns `

|---|---|
| [java.lang.Object](https://developer.android.com/reference/java/lang/Object) ||
| ↳ | android.provider.ContactsContract.Directory |

<br />

*** ** * ** ***

A Directory represents a contacts corpus, e.g. Local contacts, Google Apps Global Address List or Corporate Global Address List.

A Directory is implemented as a content provider with its unique authority and the same API as the main Contacts Provider. However, there is no expectation that every directory provider will implement this Contract in its entirety. If a directory provider does not have an implementation for a specific request, it should throw an UnsupportedOperationException.

The most important use case for Directories is search. A Directory provider is expected to support at least `https://developer.android.com/reference/android/provider/ContactsContract.Contacts#CONTENT_FILTER_URI`. If a Directory provider wants to participate in email and phone lookup functionalities, it should also implement `https://developer.android.com/reference/android/provider/ContactsContract.CommonDataKinds.Email#CONTENT_FILTER_URI` and `https://developer.android.com/reference/android/provider/ContactsContract.CommonDataKinds.Phone#CONTENT_FILTER_URI`.

> [!NOTE]
> **Note:** If an app targets `https://developer.android.com/reference/android/os/Build.VERSION_CODES#CINNAMON_BUN` or after, they must hold `https://developer.android.com/reference/android/Manifest.permission#WRITE_CONTACTS` permission in order to respond to directory contact queries such as `https://developer.android.com/reference/android/provider/ContactsContract.Contacts#CONTENT_FILTER_URI`. Additionally, Apps must have `https://developer.android.com/reference/android/Manifest.permission#READ_CALL_LOG` in order respond to `https://developer.android.com/reference/android/provider/ContactsContract.PhoneLookup#CONTENT_FILTER_URI` and `https://developer.android.com/reference/android/provider/ContactsContract.CommonDataKinds.Phone#CONTENT_FILTER_URI`. If an app that implements a directory provider lacks the required permissions the contacts provider will not forward queries to it.

<br />

A directory provider should return NULL for every projection field it does not recognize, rather than throwing an exception. This way it will not be broken if ContactsContract is extended with new fields in the future.

The client interacts with a directory via Contacts Provider by supplying an optional `directory=` query parameter.

<br />

When the Contacts Provider receives the request, it transforms the URI and forwards the request to the corresponding directory content provider. The URI is transformed in the following fashion:

- The URI authority is replaced with the corresponding `https://developer.android.com/reference/android/provider/ContactsContract.Directory#DIRECTORY_AUTHORITY`.
- The `accountName=` and `accountType=` parameters are added or replaced using the corresponding `https://developer.android.com/reference/android/provider/ContactsContract.Directory#ACCOUNT_TYPE` and `https://developer.android.com/reference/android/provider/ContactsContract.Directory#ACCOUNT_NAME` values.

<br />

Clients should send directory requests to Contacts Provider and let it forward them to the respective providers rather than constructing directory provider URIs by themselves. This level of indirection allows Contacts Provider to implement additional system-level features and optimizations. Access to Contacts Provider is protected by the READ_CONTACTS permission, but access to the directory provider is protected by BIND_DIRECTORY_SEARCH. This permission was introduced at the API level 17, for previous platform versions the provider should perform the following check to make sure the call is coming from the ContactsProvider:

```
private boolean isCallerAllowed() {
  PackageManager pm = getContext().getPackageManager();
  for (String packageName: pm.getPackagesForUid(Binder.getCallingUid())) {
    if (packageName.equals("com.android.providers.contacts")) {
      return true;
    }
  }
  return false;
}
```

<br />

The Directory table is read-only and is maintained by the Contacts Provider automatically.

It always has at least these two rows:

- The local directory. It has `https://developer.android.com/reference/android/provider/BaseColumns#_ID` = `https://developer.android.com/reference/android/provider/ContactsContract.Directory#DEFAULT`. This directory can be used to access locally stored contacts. The same can be achieved by omitting the `directory=` parameter altogether.
- The local invisible contacts. The corresponding directory ID is `https://developer.android.com/reference/android/provider/ContactsContract.Directory#LOCAL_INVISIBLE`.

<br />

Custom Directories are discovered by the Contacts Provider following this procedure:

- It finds all installed content providers with meta data identifying them as directory providers in AndroidManifest.xml: ` <meta-data android:name="android.content.ContactDirectory" android:value="true" /> `

  This tag should be placed inside the corresponding content provider declaration.
- Then Contacts Provider sends a `https://developer.android.com/reference/android/provider/ContactsContract.Directory#CONTENT_URI` query to each of the directory authorities. A directory provider must implement this query and return a list of directories. Each directory returned by the provider must have a unique combination for the `https://developer.android.com/reference/android/provider/ContactsContract.Directory#ACCOUNT_NAME` and `https://developer.android.com/reference/android/provider/ContactsContract.Directory#ACCOUNT_TYPE` columns (nulls are allowed). Since directory IDs are assigned automatically, the _ID field will not be part of the query projection.
- Contacts Provider compiles directory lists received from all directory providers into one, assigns each individual directory a globally unique ID and stores all directory records in the Directory table.

<br />

Contacts Provider automatically interrogates newly installed or replaced packages. Thus simply installing a package containing a directory provider is sufficient to have that provider registered. A package supplying a directory provider does not have to contain launchable activities.

Every row in the Directory table is automatically associated with the corresponding package (apk). If the package is later uninstalled, all corresponding directory rows are automatically removed from the Contacts Provider.

When the list of directories handled by a directory provider changes (for instance when the user adds a new Directory account), the directory provider should call `https://developer.android.com/reference/android/provider/ContactsContract.Directory#notifyDirectoryChange(android.content.ContentResolver)` to notify the Contacts Provider of the change. In response, the Contacts Provider will requery the directory provider to obtain the new list of directories.

A directory row can be optionally associated with an existing account (see `https://developer.android.com/reference/android/accounts/AccountManager`). If the account is later removed, the corresponding directory rows are automatically removed from the Contacts Provider.

<br />

## Summary

| ### Constants ||
|---|---|
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/provider/ContactsContract.Directory#ACCOUNT_NAME` The account with which this directory is associated. |
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/provider/ContactsContract.Directory#ACCOUNT_TYPE` The account type which this directory is associated. |
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/provider/ContactsContract.Directory#CALLER_PACKAGE_PARAM_KEY` A query parameter that's passed to directory providers which indicates the client package name that has made the query requests. |
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/provider/ContactsContract.Directory#CONTENT_ITEM_TYPE` The MIME type of a `https://developer.android.com/reference/android/provider/ContactsContract.Directory#CONTENT_URI` item. |
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/provider/ContactsContract.Directory#CONTENT_TYPE` The MIME-type of `https://developer.android.com/reference/android/provider/ContactsContract.Directory#CONTENT_URI` providing a directory of contact directories. |
| `long` | `https://developer.android.com/reference/android/provider/ContactsContract.Directory#DEFAULT` _ID of the default directory, which represents locally stored contacts. |
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/provider/ContactsContract.Directory#DIRECTORY_AUTHORITY` <br /> The authority of the Directory Provider. |
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/provider/ContactsContract.Directory#DISPLAY_NAME` An optional name that can be used in the UI to represent this directory, e.g. "Acme Corp" TYPE: text <br /> |
| `long` | `https://developer.android.com/reference/android/provider/ContactsContract.Directory#ENTERPRISE_DEFAULT` _ID of the managed profile default directory, which represents locally stored contacts. |
| `long` | `https://developer.android.com/reference/android/provider/ContactsContract.Directory#ENTERPRISE_LOCAL_INVISIBLE` _ID of the managed profile directory that represents locally stored invisible contacts. |
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/provider/ContactsContract.Directory#EXPORT_SUPPORT` One of `https://developer.android.com/reference/android/provider/ContactsContract.Directory#EXPORT_SUPPORT_NONE`, `https://developer.android.com/reference/android/provider/ContactsContract.Directory#EXPORT_SUPPORT_ANY_ACCOUNT`, `https://developer.android.com/reference/android/provider/ContactsContract.Directory#EXPORT_SUPPORT_SAME_ACCOUNT_ONLY`. |
| `int` | `https://developer.android.com/reference/android/provider/ContactsContract.Directory#EXPORT_SUPPORT_ANY_ACCOUNT` An `https://developer.android.com/reference/android/provider/ContactsContract.Directory#EXPORT_SUPPORT` setting that indicates that the directory allow its data copied to any contacts account. |
| `int` | `https://developer.android.com/reference/android/provider/ContactsContract.Directory#EXPORT_SUPPORT_NONE` An `https://developer.android.com/reference/android/provider/ContactsContract.Directory#EXPORT_SUPPORT` setting that indicates that the directory does not allow any data to be copied out of it. |
| `int` | `https://developer.android.com/reference/android/provider/ContactsContract.Directory#EXPORT_SUPPORT_SAME_ACCOUNT_ONLY` An `https://developer.android.com/reference/android/provider/ContactsContract.Directory#EXPORT_SUPPORT` setting that indicates that the directory allow its data copied only to the account specified by `https://developer.android.com/reference/android/provider/ContactsContract.Directory#ACCOUNT_TYPE`/`https://developer.android.com/reference/android/provider/ContactsContract.Directory#ACCOUNT_NAME`. |
| `long` | `https://developer.android.com/reference/android/provider/ContactsContract.Directory#LOCAL_INVISIBLE` _ID of the directory that represents locally stored invisible contacts. |
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/provider/ContactsContract.Directory#PACKAGE_NAME` The name of the package that owns this directory. |
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/provider/ContactsContract.Directory#PHOTO_SUPPORT` One of `https://developer.android.com/reference/android/provider/ContactsContract.Directory#PHOTO_SUPPORT_NONE`, `https://developer.android.com/reference/android/provider/ContactsContract.Directory#PHOTO_SUPPORT_THUMBNAIL_ONLY`, `https://developer.android.com/reference/android/provider/ContactsContract.Directory#PHOTO_SUPPORT_FULL`. |
| `int` | `https://developer.android.com/reference/android/provider/ContactsContract.Directory#PHOTO_SUPPORT_FULL` An `https://developer.android.com/reference/android/provider/ContactsContract.Directory#PHOTO_SUPPORT` setting that indicates that the directory can produce thumbnails as well as full-size contact photos. |
| `int` | `https://developer.android.com/reference/android/provider/ContactsContract.Directory#PHOTO_SUPPORT_FULL_SIZE_ONLY` An `https://developer.android.com/reference/android/provider/ContactsContract.Directory#PHOTO_SUPPORT` setting that indicates that the directory has full-size contact photos, but cannot provide scaled thumbnails. |
| `int` | `https://developer.android.com/reference/android/provider/ContactsContract.Directory#PHOTO_SUPPORT_NONE` An `https://developer.android.com/reference/android/provider/ContactsContract.Directory#PHOTO_SUPPORT` setting that indicates that the directory does not provide any photos. |
| `int` | `https://developer.android.com/reference/android/provider/ContactsContract.Directory#PHOTO_SUPPORT_THUMBNAIL_ONLY` An `https://developer.android.com/reference/android/provider/ContactsContract.Directory#PHOTO_SUPPORT` setting that indicates that the directory can only produce small size thumbnails of contact photos. |
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/provider/ContactsContract.Directory#SHORTCUT_SUPPORT` One of `https://developer.android.com/reference/android/provider/ContactsContract.Directory#SHORTCUT_SUPPORT_NONE`, `https://developer.android.com/reference/android/provider/ContactsContract.Directory#SHORTCUT_SUPPORT_DATA_ITEMS_ONLY`, `https://developer.android.com/reference/android/provider/ContactsContract.Directory#SHORTCUT_SUPPORT_FULL`. |
| `int` | `https://developer.android.com/reference/android/provider/ContactsContract.Directory#SHORTCUT_SUPPORT_DATA_ITEMS_ONLY` An `https://developer.android.com/reference/android/provider/ContactsContract.Directory#SHORTCUT_SUPPORT` setting that indicates that the directory allow creation of shortcuts for data items like email, phone or postal address, but not the entire contact. |
| `int` | `https://developer.android.com/reference/android/provider/ContactsContract.Directory#SHORTCUT_SUPPORT_FULL` An `https://developer.android.com/reference/android/provider/ContactsContract.Directory#SHORTCUT_SUPPORT` setting that indicates that the directory allow creation of shortcuts for contact as well as their constituent elements. |
| `int` | `https://developer.android.com/reference/android/provider/ContactsContract.Directory#SHORTCUT_SUPPORT_NONE` An `https://developer.android.com/reference/android/provider/ContactsContract.Directory#SHORTCUT_SUPPORT` setting that indicates that the directory does not allow any shortcuts created for its contacts. |
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/provider/ContactsContract.Directory#TYPE_RESOURCE_ID` The type of directory captured as a resource ID in the context of the package `https://developer.android.com/reference/android/provider/ContactsContract.Directory#PACKAGE_NAME`, e.g. "Corporate Directory" TYPE: INTEGER <br /> |

### Inherited constants

From interface `https://developer.android.com/reference/android/provider/BaseColumns` `https://developer.android.com/reference/java/lang/String` `https://developer.android.com/reference/android/provider/BaseColumns#_COUNT`

The count of rows in a directory.
`https://developer.android.com/reference/java/lang/String` `https://developer.android.com/reference/android/provider/BaseColumns#_ID`

The unique ID for a row.

| ### Fields ||
|---|---|
| ` public static final https://developer.android.com/reference/android/net/Uri` | `https://developer.android.com/reference/android/provider/ContactsContract.Directory#CONTENT_URI` The content:// style URI for this table. |
| ` public static final https://developer.android.com/reference/android/net/Uri` | `https://developer.android.com/reference/android/provider/ContactsContract.Directory#ENTERPRISE_CONTENT_URI` URI used for getting all directories from both the calling user and the managed profile that is linked to it. |

| ### Public methods ||
|---|---|
| ` static boolean` | ` https://developer.android.com/reference/android/provider/ContactsContract.Directory#isEnterpriseDirectoryId(long)(long directoryId) ` Return TRUE if a directory ID is from the contacts provider on the enterprise profile. |
| ` static boolean` | ` https://developer.android.com/reference/android/provider/ContactsContract.Directory#isRemoteDirectoryId(long)(long directoryId) ` Return TRUE if it is a remote stored directory. |
| ` static void` | ` https://developer.android.com/reference/android/provider/ContactsContract.Directory#notifyDirectoryChange(android.content.ContentResolver)(https://developer.android.com/reference/android/content/ContentResolver resolver) ` Notifies the system of a change in the list of directories handled by a particular directory provider. |

### Inherited methods

From class ` https://developer.android.com/reference/java/lang/Object ` ` https://developer.android.com/reference/java/lang/Object` ` https://developer.android.com/reference/java/lang/Object#clone()() `

Creates and returns a copy of this object.
` boolean` ` https://developer.android.com/reference/java/lang/Object#equals(java.lang.Object)(https://developer.android.com/reference/java/lang/Object obj) `

Indicates whether some other object is "equal to" this one.
` void` ` https://developer.android.com/reference/java/lang/Object#finalize()() `

Called by the garbage collector on an object when garbage collection determines that there are no more references to the object.
` final https://developer.android.com/reference/java/lang/Class<?>` ` https://developer.android.com/reference/java/lang/Object#getClass()() `

Returns the runtime class of this `Object`.
` int` ` https://developer.android.com/reference/java/lang/Object#hashCode()() `

Returns a hash code value for the object.
` final void` ` https://developer.android.com/reference/java/lang/Object#notify()() `

Wakes up a single thread that is waiting on this object's monitor.
` final void` ` https://developer.android.com/reference/java/lang/Object#notifyAll()() `

Wakes up all threads that are waiting on this object's monitor.
` https://developer.android.com/reference/java/lang/String` ` https://developer.android.com/reference/java/lang/Object#toString()() `

Returns a string representation of the object.
` final void` ` https://developer.android.com/reference/java/lang/Object#wait(long,%20int)(long timeoutMillis, int nanos) `

Causes the current thread to wait until it is awakened, typically by being *notified* or *interrupted*, or until a certain amount of real time has elapsed.
` final void` ` https://developer.android.com/reference/java/lang/Object#wait(long)(long timeoutMillis) `

Causes the current thread to wait until it is awakened, typically by being *notified* or *interrupted*, or until a certain amount of real time has elapsed.
` final void` ` https://developer.android.com/reference/java/lang/Object#wait()() `

Causes the current thread to wait until it is awakened, typically by being *notified* or *interrupted*.

## Constants

### ACCOUNT_NAME

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

```
public static final String ACCOUNT_NAME
```

The account with which this directory is associated. If the account is later removed, the directories it owns are automatically removed from this table.

TYPE: text

<br />

<br />

Constant Value: "accountName"

### ACCOUNT_TYPE

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

```
public static final String ACCOUNT_TYPE
```

The account type which this directory is associated.

TYPE: text

<br />

<br />

Constant Value: "accountType"

### CALLER_PACKAGE_PARAM_KEY

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

```
public static final String CALLER_PACKAGE_PARAM_KEY
```

A query parameter that's passed to directory providers which indicates the client package name that has made the query requests.

<br />

Constant Value: "callerPackage"

### CONTENT_ITEM_TYPE

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

```
public static final String CONTENT_ITEM_TYPE
```

The MIME type of a `https://developer.android.com/reference/android/provider/ContactsContract.Directory#CONTENT_URI` item.

<br />

Constant Value: "vnd.android.cursor.item/contact_directory"

### CONTENT_TYPE

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

```
public static final String CONTENT_TYPE
```

The MIME-type of `https://developer.android.com/reference/android/provider/ContactsContract.Directory#CONTENT_URI` providing a directory of contact directories.

<br />

Constant Value: "vnd.android.cursor.dir/contact_directories"

### DEFAULT

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

```
public static final long DEFAULT
```

_ID of the default directory, which represents locally stored contacts. **This is only supported by `https://developer.android.com/reference/android/provider/ContactsContract.Contacts#CONTENT_URI` and `https://developer.android.com/reference/android/provider/ContactsContract.Contacts#CONTENT_FILTER_URI`. Other URLs do not support the concept of "visible" or "invisible" contacts.**

<br />

**Constant Value: 0 (0x0000000000000000)** **### DIRECTORY_AUTHORITY
Added in [API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)
```
public static final String DIRECTORY_AUTHORITY
```
<br />
The authority of the Directory Provider. Contacts Provider will use this authority to forward requests to the directory provider. A directory provider can leave this column empty - Contacts Provider will fill it in.
Clients of this API should not send requests directly to this authority. All directory requests must be routed through Contacts Provider.
TYPE: text
<br />
<br />
Constant Value: "authority"
### DISPLAY_NAME
Added in [API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)
```
public static final String DISPLAY_NAME
```
An optional name that can be used in the UI to represent this directory, e.g. "Acme Corp"
TYPE: text
<br />
<br />
Constant Value: "displayName"
### ENTERPRISE_DEFAULT
Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)
```
public static final long ENTERPRISE_DEFAULT
```
_ID of the managed profile default directory, which represents locally stored contacts.
<br />
Constant Value: 1000000000 (0x000000003b9aca00)
### ENTERPRISE_LOCAL_INVISIBLE
Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)
```
public static final long ENTERPRISE_LOCAL_INVISIBLE
```
_ID of the managed profile directory that represents locally stored invisible contacts.
<br />
Constant Value: 1000000001 (0x000000003b9aca01)
### EXPORT_SUPPORT
Added in [API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)
```
public static final String EXPORT_SUPPORT
```
One of `https://developer.android.com/reference/android/provider/ContactsContract.Directory#EXPORT_SUPPORT_NONE`, `https://developer.android.com/reference/android/provider/ContactsContract.Directory#EXPORT_SUPPORT_ANY_ACCOUNT`, `https://developer.android.com/reference/android/provider/ContactsContract.Directory#EXPORT_SUPPORT_SAME_ACCOUNT_ONLY`. This is the expectation the directory has for data exported from it. Clients must obey this setting.
<br />
Constant Value: "exportSupport"
### EXPORT_SUPPORT_ANY_ACCOUNT
Added in [API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)
```
public static final int EXPORT_SUPPORT_ANY_ACCOUNT
```
An `https://developer.android.com/reference/android/provider/ContactsContract.Directory#EXPORT_SUPPORT` setting that indicates that the directory allow its data copied to any contacts account.
<br />
Constant Value: 2 (0x00000002)
### EXPORT_SUPPORT_NONE
Added in [API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)
```
public static final int EXPORT_SUPPORT_NONE
```
An `https://developer.android.com/reference/android/provider/ContactsContract.Directory#EXPORT_SUPPORT` setting that indicates that the directory does not allow any data to be copied out of it.
<br />
Constant Value: 0 (0x00000000)
### EXPORT_SUPPORT_SAME_ACCOUNT_ONLY
Added in [API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)
```
public static final int EXPORT_SUPPORT_SAME_ACCOUNT_ONLY
```
An `https://developer.android.com/reference/android/provider/ContactsContract.Directory#EXPORT_SUPPORT` setting that indicates that the directory allow its data copied only to the account specified by `https://developer.android.com/reference/android/provider/ContactsContract.Directory#ACCOUNT_TYPE`/`https://developer.android.com/reference/android/provider/ContactsContract.Directory#ACCOUNT_NAME`.
<br />
Constant Value: 1 (0x00000001)
### LOCAL_INVISIBLE
Added in [API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)
```
public static final long LOCAL_INVISIBLE
```
_ID of the directory that represents locally stored invisible contacts.
<br />
Constant Value: 1 (0x0000000000000001)
### PACKAGE_NAME
Added in [API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)
```
public static final String PACKAGE_NAME
```
The name of the package that owns this directory. Contacts Provider fill it in with the name of the package containing the directory provider. If the package is later uninstalled, the directories it owns are automatically removed from this table.
TYPE: TEXT
<br />
<br />
Constant Value: "packageName"
### PHOTO_SUPPORT
Added in [API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)
```
public static final String PHOTO_SUPPORT
```
One of `https://developer.android.com/reference/android/provider/ContactsContract.Directory#PHOTO_SUPPORT_NONE`, `https://developer.android.com/reference/android/provider/ContactsContract.Directory#PHOTO_SUPPORT_THUMBNAIL_ONLY`, `https://developer.android.com/reference/android/provider/ContactsContract.Directory#PHOTO_SUPPORT_FULL`. This is a feature flag indicating the extent to which the directory supports contact photos.
<br />
Constant Value: "photoSupport"
### PHOTO_SUPPORT_FULL
Added in [API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)
```
public static final int PHOTO_SUPPORT_FULL
```
An `https://developer.android.com/reference/android/provider/ContactsContract.Directory#PHOTO_SUPPORT` setting that indicates that the directory can produce thumbnails as well as full-size contact photos.
<br />
Constant Value: 3 (0x00000003)
### PHOTO_SUPPORT_FULL_SIZE_ONLY
Added in [API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)
```
public static final int PHOTO_SUPPORT_FULL_SIZE_ONLY
```
An `https://developer.android.com/reference/android/provider/ContactsContract.Directory#PHOTO_SUPPORT` setting that indicates that the directory has full-size contact photos, but cannot provide scaled thumbnails.
<br />
Constant Value: 2 (0x00000002)
### PHOTO_SUPPORT_NONE
Added in [API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)
```
public static final int PHOTO_SUPPORT_NONE
```
An `https://developer.android.com/reference/android/provider/ContactsContract.Directory#PHOTO_SUPPORT` setting that indicates that the directory does not provide any photos.
<br />
Constant Value: 0 (0x00000000)
### PHOTO_SUPPORT_THUMBNAIL_ONLY
Added in [API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)
```
public static final int PHOTO_SUPPORT_THUMBNAIL_ONLY
```
An `https://developer.android.com/reference/android/provider/ContactsContract.Directory#PHOTO_SUPPORT` setting that indicates that the directory can only produce small size thumbnails of contact photos.
<br />
Constant Value: 1 (0x00000001)
### SHORTCUT_SUPPORT
Added in [API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)
```
public static final String SHORTCUT_SUPPORT
```
One of `https://developer.android.com/reference/android/provider/ContactsContract.Directory#SHORTCUT_SUPPORT_NONE`, `https://developer.android.com/reference/android/provider/ContactsContract.Directory#SHORTCUT_SUPPORT_DATA_ITEMS_ONLY`, `https://developer.android.com/reference/android/provider/ContactsContract.Directory#SHORTCUT_SUPPORT_FULL`. This is the expectation the directory has for shortcuts created for its elements. Clients must obey this setting.
<br />
Constant Value: "shortcutSupport"
### SHORTCUT_SUPPORT_DATA_ITEMS_ONLY
Added in [API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)
```
public static final int SHORTCUT_SUPPORT_DATA_ITEMS_ONLY
```
An `https://developer.android.com/reference/android/provider/ContactsContract.Directory#SHORTCUT_SUPPORT` setting that indicates that the directory allow creation of shortcuts for data items like email, phone or postal address, but not the entire contact.
<br />
Constant Value: 1 (0x00000001)
### SHORTCUT_SUPPORT_FULL
Added in [API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)
```
public static final int SHORTCUT_SUPPORT_FULL
```
An `https://developer.android.com/reference/android/provider/ContactsContract.Directory#SHORTCUT_SUPPORT` setting that indicates that the directory allow creation of shortcuts for contact as well as their constituent elements.
<br />
Constant Value: 2 (0x00000002)
### SHORTCUT_SUPPORT_NONE
Added in [API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)
```
public static final int SHORTCUT_SUPPORT_NONE
```
An `https://developer.android.com/reference/android/provider/ContactsContract.Directory#SHORTCUT_SUPPORT` setting that indicates that the directory does not allow any shortcuts created for its contacts.
<br />
Constant Value: 0 (0x00000000)
### TYPE_RESOURCE_ID
Added in [API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)
```
public static final String TYPE_RESOURCE_ID
```
The type of directory captured as a resource ID in the context of the package `https://developer.android.com/reference/android/provider/ContactsContract.Directory#PACKAGE_NAME`, e.g. "Corporate Directory"
TYPE: INTEGER
<br />
<br />
Constant Value: "typeResourceId"
## Fields
### CONTENT_URI
Added in [API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)
```
public static final Uri CONTENT_URI
```
The content:// style URI for this table. Requests to this URI can be performed on the UI thread because they are always unblocking.
<br />
### ENTERPRISE_CONTENT_URI
Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)
```
public static final Uri ENTERPRISE_CONTENT_URI
```
URI used for getting all directories from both the calling user and the managed profile that is linked to it.
It supports the same semantics as `https://developer.android.com/reference/android/provider/ContactsContract.Directory#CONTENT_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 `https://developer.android.com/reference/android/provider/ContactsContract.Directory#CONTENT_URI`.
If there is a managed profile linked to the calling user, it will return merged results from both.
Note: this query returns the calling user results before the managed profile results, and this order is not affected by the sorting parameter.
<br />
## Public methods
### isEnterpriseDirectoryId
Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)
```
public static boolean isEnterpriseDirectoryId (long directoryId)
```
Return TRUE if a directory ID is from the contacts provider on the enterprise profile.
<br />
| Parameters ||
|---|---|
| `directoryId` | `long` <br /> |
| Returns ||
|---|---|
| `boolean` | <br /> |
### isRemoteDirectoryId
Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)
```
public static boolean isRemoteDirectoryId (long directoryId)
```
Return TRUE if it is a remote stored directory.
<br />
| Parameters ||
|---|---|
| `directoryId` | `long` <br /> |
| Returns ||
|---|---|
| `boolean` | <br /> |
### notifyDirectoryChange
Added in [API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)
```
public static void notifyDirectoryChange (ContentResolver resolver)
```
Notifies the system of a change in the list of directories handled by a particular directory provider. The Contacts provider will turn around and send a query to the directory provider for the full list of directories, which will replace the previous list.
<br />
| Parameters ||
|---|---|
| `resolver` | `ContentResolver` <br /> |**