# ContactsContract.DisplayPhoto

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

# ContactsContract.DisplayPhoto

*** ** * ** ***

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

`
public
static
final

class
ContactsContract.DisplayPhoto
`  
`

extends `[Object](https://developer.android.com/reference/java/lang/Object)`


``


`

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

<br />

*** ** * ** ***

Helper class for accessing full-size photos by photo file ID.

Usage example:

Retrieving a full-size photo by photo file ID (see[ContactsContract.ContactsColumns.PHOTO_FILE_ID](https://developer.android.com/reference/android/provider/ContactsContract.ContactsColumns#PHOTO_FILE_ID))
:

    ```
     public InputStream openDisplayPhoto(long photoFileId) {
         Uri displayPhotoUri = ContentUris.withAppendedId(DisplayPhoto.CONTENT_URI, photoKey);
         try {
             AssetFileDescriptor fd = getContentResolver().openAssetFileDescriptor(
                 displayPhotoUri, "r");
             return fd.createInputStream();
         } catch (IOException e) {
             return null;
         }
     }
     
    ```

<br />

<br />

## Summary

|                                                                                                                                                                                                                                                  ### Constants                                                                                                                                                                                                                                                  ||
|--------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [String](https://developer.android.com/reference/java/lang/String) | [DISPLAY_MAX_DIM](https://developer.android.com/reference/android/provider/ContactsContract.DisplayPhoto#DISPLAY_MAX_DIM) Queries to[ContactsContract.DisplayPhoto.CONTENT_MAX_DIMENSIONS_URI](https://developer.android.com/reference/android/provider/ContactsContract.DisplayPhoto#CONTENT_MAX_DIMENSIONS_URI)will contain this column, populated with the maximum height and width (in pixels) that will be stored for a display photo. |
| [String](https://developer.android.com/reference/java/lang/String) | [THUMBNAIL_MAX_DIM](https://developer.android.com/reference/android/provider/ContactsContract.DisplayPhoto#THUMBNAIL_MAX_DIM) Queries to[ContactsContract.DisplayPhoto.CONTENT_MAX_DIMENSIONS_URI](https://developer.android.com/reference/android/provider/ContactsContract.DisplayPhoto#CONTENT_MAX_DIMENSIONS_URI)will contain this column, populated with the height and width (in pixels) for photo thumbnails.                        |

|                                                                                                                                                               ### Fields                                                                                                                                                               ||
|---------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| ` public static final `[Uri](https://developer.android.com/reference/android/net/Uri) | [CONTENT_MAX_DIMENSIONS_URI](https://developer.android.com/reference/android/provider/ContactsContract.DisplayPhoto#CONTENT_MAX_DIMENSIONS_URI) This URI allows the caller to query for the maximum dimensions of a display photo or thumbnail. |
| ` public static final `[Uri](https://developer.android.com/reference/android/net/Uri) | [CONTENT_URI](https://developer.android.com/reference/android/provider/ContactsContract.DisplayPhoto#CONTENT_URI) The content:// style URI for this class, which allows access to full-size photos, given a key.                                |

| ### Inherited methods |
|-----------------------|---|
| From class` `[java.lang.Object](https://developer.android.com/reference/java/lang/Object)` ` |--------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | ` `[Object](https://developer.android.com/reference/java/lang/Object)          | ` `[clone](https://developer.android.com/reference/java/lang/Object#clone())`() ` Creates and returns a copy of this object.                                                                                                                                                      | | ` boolean`                                                                     | ` `[equals](https://developer.android.com/reference/java/lang/Object#equals(java.lang.Object))`(`[Object](https://developer.android.com/reference/java/lang/Object)` obj) ` Indicates whether some other object is "equal to" this one.                                           | | ` void`                                                                        | ` `[finalize](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 `[Class](https://developer.android.com/reference/java/lang/Class)`<?>` | ` `[getClass](https://developer.android.com/reference/java/lang/Object#getClass())`() ` Returns the runtime class of this`Object`.                                                                                                                                                | | ` int`                                                                         | ` `[hashCode](https://developer.android.com/reference/java/lang/Object#hashCode())`() ` Returns a hash code value for the object.                                                                                                                                                 | | ` final void`                                                                  | ` `[notify](https://developer.android.com/reference/java/lang/Object#notify())`() ` Wakes up a single thread that is waiting on this object's monitor.                                                                                                                            | | ` final void`                                                                  | ` `[notifyAll](https://developer.android.com/reference/java/lang/Object#notifyAll())`() ` Wakes up all threads that are waiting on this object's monitor.                                                                                                                         | | ` `[String](https://developer.android.com/reference/java/lang/String)          | ` `[toString](https://developer.android.com/reference/java/lang/Object#toString())`() ` Returns a string representation of the object.                                                                                                                                            | | ` final void`                                                                  | ` `[wait](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`                                                                  | ` `[wait](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`                                                                  | ` `[wait](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

### DISPLAY_MAX_DIM

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

```
public static final String DISPLAY_MAX_DIM
```

Queries to[ContactsContract.DisplayPhoto.CONTENT_MAX_DIMENSIONS_URI](https://developer.android.com/reference/android/provider/ContactsContract.DisplayPhoto#CONTENT_MAX_DIMENSIONS_URI)will contain this column, populated with the maximum height and width (in pixels) that will be stored for a display photo. Larger photos will be down-sized to fit within a square of this many pixels.

<br />

Constant Value: "display_max_dim"  

### THUMBNAIL_MAX_DIM

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

```
public static final String THUMBNAIL_MAX_DIM
```

Queries to[ContactsContract.DisplayPhoto.CONTENT_MAX_DIMENSIONS_URI](https://developer.android.com/reference/android/provider/ContactsContract.DisplayPhoto#CONTENT_MAX_DIMENSIONS_URI)will contain this column, populated with the height and width (in pixels) for photo thumbnails.

<br />

Constant Value: "thumbnail_max_dim"

## Fields

### CONTENT_MAX_DIMENSIONS_URI

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

```
public static final Uri CONTENT_MAX_DIMENSIONS_URI
```

This URI allows the caller to query for the maximum dimensions of a display photo or thumbnail. Requests to this URI can be performed on the UI thread because they are always unblocking.

<br />

### CONTENT_URI

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

```
public static final Uri CONTENT_URI
```

The content:// style URI for this class, which allows access to full-size photos, given a key.

<br />