# LongTextComplicationData

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

*** ** * ** ***


```
public final class LongTextComplicationData 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.LongTextComplicationData](https://developer.android.com/reference/androidx/wear/watchface/complications/data/LongTextComplicationData) |

*** ** * ** ***

Type used for complications where the primary piece of data is a piece of text. The text may be accompanied by an icon and/or a title.

The text is expected to always be displayed.

The title, if provided, it is expected that this field will be displayed.

If a `https://developer.android.com/reference/androidx/wear/watchface/complications/data/LongTextComplicationData#monochromaticImage()` and a `https://developer.android.com/reference/androidx/wear/watchface/complications/data/LongTextComplicationData#smallImage()` are both specified then only one should be displayed. If the complication is drawn with a single color it's recommended to choose `https://developer.android.com/reference/androidx/wear/watchface/complications/data/LongTextComplicationData#monochromaticImage()` and apply a tint. If the complication is rendered with multiple colors it's recommended to choose the `https://developer.android.com/reference/androidx/wear/watchface/complications/data/LongTextComplicationData#smallImage()`. It's best practice for a ComplicationDataSource to specify both a `https://developer.android.com/reference/androidx/wear/watchface/complications/data/LongTextComplicationData#monochromaticImage()` and a `https://developer.android.com/reference/androidx/wear/watchface/complications/data/LongTextComplicationData#smallImage()`.

A data source that wants to serve a LongTextComplicationData 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="LONG_TEXT"/>
```

## Summary

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

| ### Public fields |
|---|---|
| `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/LongTextComplicationData#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/LongTextComplicationData#getContentDescription()()` The content description field for accessibility. |
| `final https://developer.android.com/reference/androidx/wear/watchface/complications/data/MonochromaticImage` | `https://developer.android.com/reference/androidx/wear/watchface/complications/data/LongTextComplicationData#getMonochromaticImage()()` A simple `https://developer.android.com/reference/androidx/wear/watchface/complications/data/MonochromaticImage` image that can be tinted by the watch face. |
| `@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/LongTextComplicationData#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 https://developer.android.com/reference/androidx/wear/watchface/complications/data/SmallImage` | `https://developer.android.com/reference/androidx/wear/watchface/complications/data/LongTextComplicationData#getSmallImage()()` A `https://developer.android.com/reference/androidx/wear/watchface/complications/data/SmallImage` that is expected to cover a small fraction of a watch face occupied by a single complication. |
| `final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/wear/watchface/complications/data/ComplicationText` | `https://developer.android.com/reference/androidx/wear/watchface/complications/data/LongTextComplicationData#getText()()` The body `https://developer.android.com/reference/androidx/wear/watchface/complications/data/ComplicationText` of the complication. |
| `final https://developer.android.com/reference/androidx/wear/watchface/complications/data/ComplicationText` | `https://developer.android.com/reference/androidx/wear/watchface/complications/data/LongTextComplicationData#getTitle()()` The optional title `https://developer.android.com/reference/androidx/wear/watchface/complications/data/ComplicationText`. |
| `boolean` | `https://developer.android.com/reference/androidx/wear/watchface/complications/data/LongTextComplicationData#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/LongTextComplicationData#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`.
`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

### 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.

### getMonochromaticImage

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

```
public final MonochromaticImage getMonochromaticImage()
```

A simple `https://developer.android.com/reference/androidx/wear/watchface/complications/data/MonochromaticImage` image that can be tinted by the watch face. If the monochromaticImage is equal to `https://developer.android.com/reference/androidx/wear/watchface/complications/data/MonochromaticImage#PLACEHOLDER()` the renderer must treat it as a placeholder rather than rendering normally, its suggested it should be rendered as a light grey box.

### getNextChangeInstant

```
public @NonNull Instant getNextChangeInstant(@NonNull Instant 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. If there's no scheduled changes then `https://developer.android.com/reference/java/time/Instant.html#MAX` will be returned.

See `https://developer.android.com/reference/androidx/wear/watchface/complications/data/ComplicationText#getNextChangeTime(java.time.Instant)`

| Parameters |
|---|---|
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/time/Instant.html afterInstant` | The reference `https://developer.android.com/reference/java/time/Instant.html`, after which changes will be reported. |

### getSmallImage

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

```
public final SmallImage getSmallImage()
```

A `https://developer.android.com/reference/androidx/wear/watchface/complications/data/SmallImage` that is expected to cover a small fraction of a watch face occupied by a single complication. If the smallImage is equal to `https://developer.android.com/reference/androidx/wear/watchface/complications/data/SmallImage#PLACEHOLDER()` the renderer must treat it as a placeholder rather than rendering normally, its suggested it should be rendered as a light grey box.

### getText

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

```
public final @NonNull ComplicationText getText()
```

The body `https://developer.android.com/reference/androidx/wear/watchface/complications/data/ComplicationText` of the complication. If the text is equal to `https://developer.android.com/reference/androidx/wear/watchface/complications/data/ComplicationText#PLACEHOLDER()` the renderer must treat it as a placeholder rather than rendering normally, its suggested it should be rendered as a light grey box.

### getTitle

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

```
public final ComplicationText getTitle()
```

The optional title `https://developer.android.com/reference/androidx/wear/watchface/complications/data/ComplicationText`. If the title is equal to `https://developer.android.com/reference/androidx/wear/watchface/complications/data/ComplicationText#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()
```