# PhotoImageComplicationData

Artifact: [androidx.wear.watchface:watchface-complications-data](https://developer.android.com/jetpack/androidx/releases/wear-watchface) [View Source](https://cs.android.com/search?q=file:androidx/wear/watchface/complications/data/Data.kt+class:androidx.wear.watchface.complications.data.PhotoImageComplicationData) Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/wear-watchface#1.0.0)

*** ** * ** ***

<br />

```
public final class PhotoImageComplicationData extends ComplicationData
```

<br />

|---|---|---|
| [java.lang.Object](https://developer.android.com/reference/java/lang/Object.html) |||
| ↳ | [androidx.wear.watchface.complications.data.ComplicationData](https://developer.android.com/reference/androidx/wear/watchface/complications/data/ComplicationData) ||
|   | ↳ | [androidx.wear.watchface.complications.data.PhotoImageComplicationData](https://developer.android.com/reference/androidx/wear/watchface/complications/data/PhotoImageComplicationData) |

*** ** * ** ***

Type used for complications which consist only of an image that is expected to fill a large part of the watch face, large enough to be shown as either a background or as part of a high resolution complication.

The image is expected to always be displayed. The image may be shown as the background, any other part of the watch face or within a complication. The image is large enough to be cover the entire screen. The image may be cropped to fit the watch face or complication.

A data source that wants to serve a PhotoImageComplicationData must include the following meta data in its manifest (NB the value is a comma separated list):

```
<meta-data android:name="android.support.wearable.complications.SUPPORTED_TYPES"
   android:value="LARGE_IMAGE"/>
```

## Summary

| ### Nested types |
|---|
| `public final class https://developer.android.com/reference/androidx/wear/watchface/complications/data/PhotoImageComplicationData.Builder` Builder for `https://developer.android.com/reference/androidx/wear/watchface/complications/data/PhotoImageComplicationData`. |

| ### Public fields |
|---|---|
| `static final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/graphics/drawable/Icon.html` | `https://developer.android.com/reference/androidx/wear/watchface/complications/data/PhotoImageComplicationData#PLACEHOLDER()` Used to signal the photo image should be rendered as a placeholder. |
| `static final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/wear/watchface/complications/data/ComplicationType` | `https://developer.android.com/reference/androidx/wear/watchface/complications/data/PhotoImageComplicationData#TYPE()` The `https://developer.android.com/reference/androidx/wear/watchface/complications/data/ComplicationType` corresponding to objects of this type. |

| ### Public methods |
|---|---|
| `final https://developer.android.com/reference/androidx/wear/watchface/complications/data/ComplicationText` | `https://developer.android.com/reference/androidx/wear/watchface/complications/data/PhotoImageComplicationData#getContentDescription()()` The content description field for accessibility. |
| `final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/graphics/drawable/Icon.html` | `https://developer.android.com/reference/androidx/wear/watchface/complications/data/PhotoImageComplicationData#getPhotoImage()()` The `https://developer.android.com/reference/android/graphics/drawable/Icon.html` that is expected to fill a large part of the watch face, large enough to be shown as either a background or as part of a high resolution complication. |
| `boolean` | `https://developer.android.com/reference/androidx/wear/watchface/complications/data/PhotoImageComplicationData#hasPlaceholderFields()()` Returns `true` if any of the fields of this ComplicationData are placeholders. |
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/String.html` | `https://developer.android.com/reference/androidx/wear/watchface/complications/data/PhotoImageComplicationData#toString()()` |

### Inherited methods

From [androidx.wear.watchface.complications.data.ComplicationData](https://developer.android.com/reference/androidx/wear/watchface/complications/data/ComplicationData) `boolean` `https://developer.android.com/reference/androidx/wear/watchface/complications/data/ComplicationData#equals(kotlin.Any)(https://developer.android.com/reference/java/lang/Object.html other)` `final https://developer.android.com/reference/android/content/ComponentName.html` `https://developer.android.com/reference/androidx/wear/watchface/complications/data/ComplicationData#getDataSource()()`

The `https://developer.android.com/reference/android/content/ComponentName.html` of the `https://developer.android.com/reference/androidx/wear/watchface/complications/datasource/ComplicationDataSourceService` that provided the ComplicationData.
`final int` `https://developer.android.com/reference/androidx/wear/watchface/complications/data/ComplicationData#getDisplayPolicy()()`

The `https://developer.android.com/reference/androidx/wear/watchface/complications/data/ComplicationDisplayPolicies` for this complication.
`final https://developer.android.com/reference/androidx/wear/watchface/complications/data/ComplicationData` `https://developer.android.com/reference/androidx/wear/watchface/complications/data/ComplicationData#getDynamicValueInvalidationFallback()()`

Used in case any dynamic value has been invalidated.
`final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/os/PersistableBundle.html` `https://developer.android.com/reference/androidx/wear/watchface/complications/data/ComplicationData#getExtras()()`

A copy of any extras set by a complication provider with the privileged permission `com.google.wear.permission.SET_COMPLICATION_EXTRAS` or `https://developer.android.com/reference/android/os/PersistableBundle.html#EMPTY`.
`@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/time/Instant.html` `https://developer.android.com/reference/androidx/wear/watchface/complications/data/ComplicationData#getNextChangeInstant(java.time.Instant)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/time/Instant.html afterInstant)`

Returns the next `https://developer.android.com/reference/java/time/Instant.html` after `https://developer.android.com/reference/androidx/wear/watchface/complications/data/ComplicationData#getNextChangeInstant(java.time.Instant)` at which any field of the complication may change.
`final int` `https://developer.android.com/reference/androidx/wear/watchface/complications/data/ComplicationData#getPersistencePolicy()()`

The `https://developer.android.com/reference/androidx/wear/watchface/complications/data/ComplicationPersistencePolicies` for this complication.
`final https://developer.android.com/reference/android/app/PendingIntent.html` `https://developer.android.com/reference/androidx/wear/watchface/complications/data/ComplicationData#getTapAction()()`

The `https://developer.android.com/reference/android/app/PendingIntent.html` to send when the complication is tapped on.
`final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/wear/watchface/complications/data/ComplicationType` `https://developer.android.com/reference/androidx/wear/watchface/complications/data/ComplicationData#getType()()`

The `https://developer.android.com/reference/androidx/wear/watchface/complications/data/ComplicationType` of this complication data.
`final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/wear/watchface/complications/data/TimeRange` `https://developer.android.com/reference/androidx/wear/watchface/complications/data/ComplicationData#getValidTimeRange()()`

The `https://developer.android.com/reference/androidx/wear/watchface/complications/data/TimeRange` within which the complication should be displayed.
`int` `https://developer.android.com/reference/androidx/wear/watchface/complications/data/ComplicationData#hashCode()()` `final boolean` `https://developer.android.com/reference/androidx/wear/watchface/complications/data/ComplicationData#isTapActionLostDueToSerialization()()`

`https://developer.android.com/reference/androidx/wear/watchface/complications/data/ComplicationData#tapAction()` which is a `https://developer.android.com/reference/android/app/PendingIntent.html` unfortunately can't be serialized.
`final void` `https://developer.android.com/reference/androidx/wear/watchface/complications/data/ComplicationData#setTapActionLostDueToSerialization(kotlin.Boolean)(boolean value)`

`https://developer.android.com/reference/androidx/wear/watchface/complications/data/ComplicationData#tapAction()` which is a `https://developer.android.com/reference/android/app/PendingIntent.html` unfortunately can't be serialized.

## Public fields

### PLACEHOLDER

```
public static final @NonNull Icon PLACEHOLDER
```

Used to signal the photo image should be rendered as a placeholder. It's suggested that a placeholder ranged value be drawn as a grey arc with a percentage value selected by the renderer.

Note a placeholder may only be used in the context of `https://developer.android.com/reference/androidx/wear/watchface/complications/data/NoDataComplicationData#placeholder()`.

### TYPE

```
public static final @NonNull ComplicationType TYPE
```

The `https://developer.android.com/reference/androidx/wear/watchface/complications/data/ComplicationType` corresponding to objects of this type.

## Public methods

### getContentDescription

Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/wear-watchface#1.0.0)

```
public final ComplicationText getContentDescription()
```

The content description field for accessibility.

### getPhotoImage

Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/wear-watchface#1.0.0)

```
public final @NonNull Icon getPhotoImage()
```

The `https://developer.android.com/reference/android/graphics/drawable/Icon.html` that is expected to fill a large part of the watch face, large enough to be shown as either a background or as part of a high resolution complication. This must not be tinted. If the photoImage is equal to `https://developer.android.com/reference/androidx/wear/watchface/complications/data/PhotoImageComplicationData#PLACEHOLDER()` the renderer must treat it as a placeholder rather than rendering normally, its suggested it should be rendered as a light grey box.

### hasPlaceholderFields

```
public boolean hasPlaceholderFields()
```

Returns `true` if any of the fields of this ComplicationData are placeholders. I.e. if any fields are equal to: `https://developer.android.com/reference/androidx/wear/watchface/complications/data/ComplicationText#PLACEHOLDER()`, `https://developer.android.com/reference/androidx/wear/watchface/complications/data/SmallImage#PLACEHOLDER()`, `https://developer.android.com/reference/androidx/wear/watchface/complications/data/MonochromaticImage#PLACEHOLDER()`, `https://developer.android.com/reference/androidx/wear/watchface/complications/data/PhotoImageComplicationData#PLACEHOLDER()`, or `https://developer.android.com/reference/androidx/wear/watchface/complications/data/RangedValueComplicationData#PLACEHOLDER()`.

### toString

```
public @NonNull String toString()
```