# PhotoImageComplicationData.Builder

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.Builder) Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/wear-watchface#1.0.0)

*** ** * ** ***


```
public final class PhotoImageComplicationData.Builder
```

<br />

*** ** * ** ***

Builder for `https://developer.android.com/reference/androidx/wear/watchface/complications/data/PhotoImageComplicationData`.

You must at a minimum set the `https://developer.android.com/reference/androidx/wear/watchface/complications/data/PhotoImageComplicationData.Builder#(android.graphics.drawable.Icon,androidx.wear.watchface.complications.data.ComplicationText)` and `https://developer.android.com/reference/androidx/wear/watchface/complications/data/PhotoImageComplicationData.Builder#(android.graphics.drawable.Icon,androidx.wear.watchface.complications.data.ComplicationText)` fields.

## Summary

| ### Public constructors |
|---|
| `https://developer.android.com/reference/androidx/wear/watchface/complications/data/PhotoImageComplicationData.Builder#Builder(android.graphics.drawable.Icon,androidx.wear.watchface.complications.data.ComplicationText)( @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/graphics/drawable/Icon.html photoImage, @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/wear/watchface/complications/data/ComplicationText contentDescription )` |

| ### Public methods |
|---|---|
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/wear/watchface/complications/data/PhotoImageComplicationData` | `https://developer.android.com/reference/androidx/wear/watchface/complications/data/PhotoImageComplicationData.Builder#build()()` Builds the `https://developer.android.com/reference/androidx/wear/watchface/complications/data/PhotoImageComplicationData`. |
| `final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/wear/watchface/complications/data/PhotoImageComplicationData.Builder` | `https://developer.android.com/reference/androidx/wear/watchface/complications/data/PhotoImageComplicationData.Builder#setTapAction(android.app.PendingIntent)(https://developer.android.com/reference/android/app/PendingIntent.html tapAction)` Sets optional pending intent to be invoked when the complication is tapped. |
| `final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/wear/watchface/complications/data/PhotoImageComplicationData.Builder` | `https://developer.android.com/reference/androidx/wear/watchface/complications/data/PhotoImageComplicationData.Builder#setValidTimeRange(androidx.wear.watchface.complications.data.TimeRange)(https://developer.android.com/reference/androidx/wear/watchface/complications/data/TimeRange validTimeRange)` Sets optional time range during which the complication has to be shown. |

## Public constructors

### Builder

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

```
public Builder(
    @NonNull Icon photoImage,
    @NonNull ComplicationText contentDescription
)
```

| Parameters |
|---|---|
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/graphics/drawable/Icon.html photoImage` | The `https://developer.android.com/reference/android/graphics/drawable/Icon.html` to be displayed |
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/wear/watchface/complications/data/ComplicationText contentDescription` | The content description field for accessibility and is used to describe what data the image represents. If the image is purely stylistic, and does not convey any information to the user, then provide an empty content description. If no content description is provided, a generic content description will be used instead. Please do not include the word 'complication' in the description. |

## Public methods

### build

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

```
public @NonNull PhotoImageComplicationData build()
```

Builds the `https://developer.android.com/reference/androidx/wear/watchface/complications/data/PhotoImageComplicationData`.

### setTapAction

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

```
public final @NonNull PhotoImageComplicationData.Builder setTapAction(PendingIntent tapAction)
```

Sets optional pending intent to be invoked when the complication is tapped.

### setValidTimeRange

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

```
public final @NonNull PhotoImageComplicationData.Builder setValidTimeRange(TimeRange validTimeRange)
```

Sets optional time range during which the complication has to be shown.