Added in [API level 36](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels) Summary: [Nested Classes](https://developer.android.com/reference/com/google/wear/services/complications/ComplicationData#nestedclasses) \| [Constants](https://developer.android.com/reference/com/google/wear/services/complications/ComplicationData#constants) \| [Inherited Constants](https://developer.android.com/reference/com/google/wear/services/complications/ComplicationData#inhconstants) \| [Fields](https://developer.android.com/reference/com/google/wear/services/complications/ComplicationData#lfields) \| [Methods](https://developer.android.com/reference/com/google/wear/services/complications/ComplicationData#pubmethods) \| [Inherited Methods](https://developer.android.com/reference/com/google/wear/services/complications/ComplicationData#inhmethods)

# ComplicationData


`
public

final

class
ComplicationData
`


`

extends Object


`

`


implements

Parcelable


`

|---|---|
| java.lang.Object ||
| ↳ | com.google.wear.services.complications.ComplicationData |

<br />

*** ** * ** ***

Wire Format class for complication data of all types.

This class is intended to be used as a wire format for more specific definitions of
complication types present in AndroidX and WearServices. The implementation here is a best-effort
copy of `https://developer.android.com/reference/androidx/wear/watchface/complications/data/ComplicationData` from the `androidx.wear.watchface:watchface-complication-data` library. This class will eventually be the
primary implementation of "WireComplicationData" used across apps, and so other implementations
should include a way to convert their instances to instances of this class to facilitating
sending complication data over the wire.

The `https://developer.android.com/reference/com/google/wear/services/complications/ComplicationData.Builder` class should be used to construct objects of this type. Depending on the
type of complication data, some fields will be required and some will be optional - see the [Complication
Types and Fields](https://developer.android.com/training/wearables/watch-faces/adding-complications#types-fields) documentation, and the builder's set methods, for more details.

When rendering the complication data for a given time, the watch face should first call `https://developer.android.com/reference/com/google/wear/services/complications/ComplicationData#isActiveAtMillis(long)` to determine whether the data is valid at that time. See the documentation for
each of the complication types below for details of which fields are expected to be displayed.

## Summary

| ### Nested classes ||
|---|---|
| ` class` | `https://developer.android.com/reference/com/google/wear/services/complications/ComplicationData.Builder` Builder class for `https://developer.android.com/reference/com/google/wear/services/complications/ComplicationData`. |

| ### Constants ||
|---|---|
| `int` | `https://developer.android.com/reference/com/google/wear/services/complications/ComplicationData#IMAGE_STYLE_ICON` Style for small images that have a transparent background and are expected to be drawn entirely within the space available, such as a launcher icon. |
| `int` | `https://developer.android.com/reference/com/google/wear/services/complications/ComplicationData#IMAGE_STYLE_PHOTO` Style for small images which are photos that are expected to fill the space available. |

| ### Inherited constants |
|---|
| From interface `android.os.Parcelable` |---|---| | `int` | `CONTENTS_FILE_DESCRIPTOR` | | `int` | `PARCELABLE_ELIDE_DUPLICATES` | | `int` | `PARCELABLE_STABILITY_LOCAL` | | `int` | `PARCELABLE_STABILITY_VINTF` | | `int` | `PARCELABLE_WRITE_RETURN_VALUE` | |

| ### Fields ||
|---|---|
| ` public static final Creator<https://developer.android.com/reference/com/google/wear/services/complications/ComplicationData>` | `https://developer.android.com/reference/com/google/wear/services/complications/ComplicationData#CREATOR` |

| ### Public methods ||
|---|---|
| ` void` | ` https://developer.android.com/reference/com/google/wear/services/complications/ComplicationData#clearTimelineEndEpochSecond()() ` Removes the timeline end epoch time, if set, from this ComplicationData. |
| ` void` | ` https://developer.android.com/reference/com/google/wear/services/complications/ComplicationData#clearTimelineStartEpochSecond()() ` Removes the timeline start epoch time, if set, from this ComplicationData. |
| ` int` | ` https://developer.android.com/reference/com/google/wear/services/complications/ComplicationData#describeContents()() ` |
| ` boolean` | ` https://developer.android.com/reference/com/google/wear/services/complications/ComplicationData#equals(java.lang.Object)(Object o) ` |
| ` Icon` | ` https://developer.android.com/reference/com/google/wear/services/complications/ComplicationData#getBurnInProtectionIcon()() ` Returns the burn-in protection version of the icon field for this complication data, or `null` if no such icon was provided. |
| ` Icon` | ` https://developer.android.com/reference/com/google/wear/services/complications/ComplicationData#getBurnInProtectionSmallImage()() ` Returns the burn-in protection version of the small image field for this complication data, or `null` if no such icon was provided. |
| ` int[]` | ` https://developer.android.com/reference/com/google/wear/services/complications/ComplicationData#getColorRamp()() ` Returns the colors for the progress bar. |
| ` https://developer.android.com/reference/com/google/wear/services/complications/ComplicationText` | ` https://developer.android.com/reference/com/google/wear/services/complications/ComplicationData#getContentDescription()() ` Returns the content description field for this complication, for screen readers. |
| ` ComponentName` | ` https://developer.android.com/reference/com/google/wear/services/complications/ComplicationData#getDataSource()() ` The `https://developer.android.com/reference/android/content/ComponentName` of the ComplicationDataSourceService that provided this ComplicationData. |
| ` int` | ` https://developer.android.com/reference/com/google/wear/services/complications/ComplicationData#getDisplayPolicy()() ` Returns the complication's complication display policy. |
| ` int` | ` https://developer.android.com/reference/com/google/wear/services/complications/ComplicationData#getElementBackgroundColor()() ` Returns the background color to use between elements for this complication. |
| ` int[]` | ` https://developer.android.com/reference/com/google/wear/services/complications/ComplicationData#getElementColors()() ` Returns the element colors for this complication. |
| ` float[]` | ` https://developer.android.com/reference/com/google/wear/services/complications/ComplicationData#getElementWeights()() ` Returns the element weights for this complication. |
| ` long` | ` https://developer.android.com/reference/com/google/wear/services/complications/ComplicationData#getEndDateTimeMillis()() ` Returns the end time for this complication data (i.e. |
| ` PersistableBundle` | ` https://developer.android.com/reference/com/google/wear/services/complications/ComplicationData#getExtras()() ` Returns the extras set in this ComplicationData. |
| ` Icon` | ` https://developer.android.com/reference/com/google/wear/services/complications/ComplicationData#getIcon()() ` Returns the icon field for this complication data, or `null` if no value was provided for the field. |
| ` https://developer.android.com/reference/com/google/wear/services/complications/ComplicationData` | ` https://developer.android.com/reference/com/google/wear/services/complications/ComplicationData#getInvalidatedData()() ` Returns the invalidated `https://developer.android.com/reference/com/google/wear/services/complications/ComplicationData` used in `https://developer.android.com/` when generated by dynamic value invalidation, or `null`. |
| ` Icon` | ` https://developer.android.com/reference/com/google/wear/services/complications/ComplicationData#getLargeImage()() ` Returns the large image field for this complication data. |
| ` https://developer.android.com/reference/com/google/wear/services/complications/ComplicationText` | ` https://developer.android.com/reference/com/google/wear/services/complications/ComplicationData#getLongText()() ` Returns the longText field for this complication data. |
| ` https://developer.android.com/reference/com/google/wear/services/complications/ComplicationText` | ` https://developer.android.com/reference/com/google/wear/services/complications/ComplicationData#getLongTitle()() ` Returns the long title field for this complication data, or an empty bundle if no value was provided for the field. |
| ` int` | ` https://developer.android.com/reference/com/google/wear/services/complications/ComplicationData#getPersistencePolicy()() ` Returns the complication's persistence policy. |
| ` https://developer.android.com/reference/com/google/wear/services/complications/ComplicationData` | ` https://developer.android.com/reference/com/google/wear/services/complications/ComplicationData#getPlaceholder()() ` Returns the placeholder ComplicationData if there is one or `null`. |
| ` https://developer.android.com/reference/com/google/wear/expression/ProtoLayoutDynamicFloat` | ` https://developer.android.com/reference/com/google/wear/services/complications/ComplicationData#getRangedDynamicValue()() ` Returns the dynamic ranged value field for this complication. |
| ` float` | ` https://developer.android.com/reference/com/google/wear/services/complications/ComplicationData#getRangedMaxValue()() ` Returns the maxValue of the ranged value field for this complication. |
| ` float` | ` https://developer.android.com/reference/com/google/wear/services/complications/ComplicationData#getRangedMinValue()() ` Returns the minValue of the ranged value field for this complication. |
| ` float` | ` https://developer.android.com/reference/com/google/wear/services/complications/ComplicationData#getRangedValue()() ` Returns the ranged value field for this complication. |
| ` int` | ` https://developer.android.com/reference/com/google/wear/services/complications/ComplicationData#getRangedValueType()() ` Returns the ranged value type field for this complication. |
| ` https://developer.android.com/reference/com/google/wear/services/complications/ComplicationText` | ` https://developer.android.com/reference/com/google/wear/services/complications/ComplicationData#getShortText()() ` Returns the short text field for this complication data, or an empty bundle if no value was provided for the field. |
| ` https://developer.android.com/reference/com/google/wear/services/complications/ComplicationText` | ` https://developer.android.com/reference/com/google/wear/services/complications/ComplicationData#getShortTitle()() ` Returns the short title field for this complication data, or an empty bundle if no value was provided for the field. |
| ` Icon` | ` https://developer.android.com/reference/com/google/wear/services/complications/ComplicationData#getSmallImage()() ` Returns the small image field for this complication data, or `null` if no value was provided for the field. |
| ` int` | ` https://developer.android.com/reference/com/google/wear/services/complications/ComplicationData#getSmallImageStyle()() ` Returns the small image style for this complication data. |
| ` long` | ` https://developer.android.com/reference/com/google/wear/services/complications/ComplicationData#getStartDateTimeMillis()() ` Returns the start time for this complication data (i.e. |
| ` PendingIntent` | ` https://developer.android.com/reference/com/google/wear/services/complications/ComplicationData#getTapAction()() ` Returns the tap action field for this complication. |
| ` float` | ` https://developer.android.com/reference/com/google/wear/services/complications/ComplicationData#getTargetValue()() ` Returns the targetValue of the ranged value field for this complication. |
| ` long` | ` https://developer.android.com/reference/com/google/wear/services/complications/ComplicationData#getTimelineEndEpochSecond()() ` For timeline entries. |
| ` List<https://developer.android.com/reference/com/google/wear/services/complications/ComplicationData>` | ` https://developer.android.com/reference/com/google/wear/services/complications/ComplicationData#getTimelineEntries()() ` Returns the list of `https://developer.android.com/reference/com/google/wear/services/complications/ComplicationData` timeline entries. |
| ` long` | ` https://developer.android.com/reference/com/google/wear/services/complications/ComplicationData#getTimelineStartEpochSecond()() ` For timeline entries. |
| ` int` | ` https://developer.android.com/reference/com/google/wear/services/complications/ComplicationData#getType()() ` |
| ` boolean` | ` https://developer.android.com/reference/com/google/wear/services/complications/ComplicationData#hasBurnInProtectionIcon()() ` Returns true if the ComplicationData contains a burn in protection Icon. |
| ` boolean` | ` https://developer.android.com/reference/com/google/wear/services/complications/ComplicationData#hasBurnInProtectionSmallImage()() ` Returns true if the ComplicationData contains a burn in protection small image. |
| ` boolean` | ` https://developer.android.com/reference/com/google/wear/services/complications/ComplicationData#hasColorRamp()() ` Returns true if the ComplicationData has the color ramp field set. |
| ` boolean` | ` https://developer.android.com/reference/com/google/wear/services/complications/ComplicationData#hasContentDescription()() ` Returns true if the ComplicationData contains a content description. |
| ` boolean` | ` https://developer.android.com/reference/com/google/wear/services/complications/ComplicationData#hasDynamicValues()() ` Returns true if the complication contains a dynamic value that needs to be evaluated. |
| ` boolean` | ` https://developer.android.com/reference/com/google/wear/services/complications/ComplicationData#hasElementBackgroundColor()() ` Returns true if the ComplicationData contains a background color for use between elements for this complication. |
| ` boolean` | ` https://developer.android.com/reference/com/google/wear/services/complications/ComplicationData#hasElementColors()() ` Returns true if the ComplicationData contains element colors. |
| ` boolean` | ` https://developer.android.com/reference/com/google/wear/services/complications/ComplicationData#hasElementWeights()() ` Returns true if the ComplicationData contains element weights. |
| ` boolean` | ` https://developer.android.com/reference/com/google/wear/services/complications/ComplicationData#hasExtras()() ` Returns true if extras have been set in this ComplicationData. |
| ` boolean` | ` https://developer.android.com/reference/com/google/wear/services/complications/ComplicationData#hasIcon()() ` Returns true if the ComplicationData contains an Icon. |
| ` boolean` | ` https://developer.android.com/reference/com/google/wear/services/complications/ComplicationData#hasInvalidatedData()() ` Returns true if the ComplicationData contains a content description. |
| ` boolean` | ` https://developer.android.com/reference/com/google/wear/services/complications/ComplicationData#hasIsColorRampInterpolated()() ` Returns true if the ComplicationData has the isColorRampInterpolated field set. |
| ` boolean` | ` https://developer.android.com/reference/com/google/wear/services/complications/ComplicationData#hasLargeImage()() ` Returns true if the ComplicationData contains a large image. |
| ` boolean` | ` https://developer.android.com/reference/com/google/wear/services/complications/ComplicationData#hasLongText()() ` Returns true if the ComplicationData contains long text. |
| ` boolean` | ` https://developer.android.com/reference/com/google/wear/services/complications/ComplicationData#hasLongTitle()() ` Returns true if the ComplicationData contains a long title. |
| ` boolean` | ` https://developer.android.com/reference/com/google/wear/services/complications/ComplicationData#hasPlaceholder()() ` Returns true if the ComplicationData contains a placeholder. |
| ` boolean` | ` https://developer.android.com/reference/com/google/wear/services/complications/ComplicationData#hasRangedDynamicValue()() ` Returns true if the ComplicationData contains a ranged dynamic value. |
| ` boolean` | ` https://developer.android.com/reference/com/google/wear/services/complications/ComplicationData#hasRangedMaxValue()() ` Returns true if the ComplicationData contains a ranged max value. |
| ` boolean` | ` https://developer.android.com/reference/com/google/wear/services/complications/ComplicationData#hasRangedMinValue()() ` Returns true if the ComplicationData contains a ranged max value. |
| ` boolean` | ` https://developer.android.com/reference/com/google/wear/services/complications/ComplicationData#hasRangedValue()() ` Returns true if the ComplicationData contains a ranged value. |
| ` boolean` | ` https://developer.android.com/reference/com/google/wear/services/complications/ComplicationData#hasRangedValueType()() ` Returns true if the ComplicationData contains a ranged max type. |
| ` boolean` | ` https://developer.android.com/reference/com/google/wear/services/complications/ComplicationData#hasShortText()() ` Returns true if the ComplicationData contains short text. |
| ` boolean` | ` https://developer.android.com/reference/com/google/wear/services/complications/ComplicationData#hasShortTitle()() ` Returns true if the ComplicationData contains a short title. |
| ` boolean` | ` https://developer.android.com/reference/com/google/wear/services/complications/ComplicationData#hasSmallImage()() ` Returns true if the ComplicationData contains a small image. |
| ` boolean` | ` https://developer.android.com/reference/com/google/wear/services/complications/ComplicationData#hasTapAction()() ` Returns true if the ComplicationData contains a tap action. |
| ` boolean` | ` https://developer.android.com/reference/com/google/wear/services/complications/ComplicationData#hasTargetValue()() ` Returns true if the ComplicationData contains a ranged max value. |
| ` boolean` | ` https://developer.android.com/reference/com/google/wear/services/complications/ComplicationData#hasTimelineEntries()() ` Returns true if the Timeline Entries field has been set and their presence is valid for this ComplicationData. |
| ` int` | ` https://developer.android.com/reference/com/google/wear/services/complications/ComplicationData#hashCode()() ` |
| ` boolean` | ` https://developer.android.com/reference/com/google/wear/services/complications/ComplicationData#isActiveAtMillis(long)(long dateTimeMillis) ` Returns true if the complication is active and should be displayed at the given time. |
| ` boolean` | ` https://developer.android.com/reference/com/google/wear/services/complications/ComplicationData#isColorRampInterpolated()() ` Returns either a boolean where: true means the color ramp colors should be smoothly interpolated; false means the color ramp should be rendered in equal sized blocks of solid color. |
| ` boolean` | ` https://developer.android.com/reference/com/google/wear/services/complications/ComplicationData#isTapActionLostDueToSerialization()() ` TapAction unfortunately can't be serialized. |
| ` boolean` | ` https://developer.android.com/reference/com/google/wear/services/complications/ComplicationData#isTimeDependent()() ` Returns true if the complication data contains at least one text field with a value that may change based on the current time. |
| ` void` | ` https://developer.android.com/reference/com/google/wear/services/complications/ComplicationData#stripExtras()() ` Removes any extras, if set, from this ComplicationData. |
| ` String` | ` https://developer.android.com/reference/com/google/wear/services/complications/ComplicationData#toString()() ` |
| ` void` | ` https://developer.android.com/reference/com/google/wear/services/complications/ComplicationData#writeToParcel(android.os.Parcel,%20int)(Parcel dest, int flags) ` |

| ### Inherited methods |
|---|---|
| From class ` java.lang.Object ` |---|---| | ` Object` | ` clone() ` | | ` boolean` | ` equals(Object arg0) ` | | ` void` | ` finalize() ` | | ` final Class<?>` | ` getClass() ` | | ` int` | ` hashCode() ` | | ` final void` | ` notify() ` | | ` final void` | ` notifyAll() ` | | ` String` | ` toString() ` | | ` final void` | ` wait(long arg0, int arg1) ` | | ` final void` | ` wait(long arg0) ` | | ` final void` | ` wait() ` | ||
| From interface ` android.os.Parcelable ` |---|---| | ` abstract int` | ` describeContents() ` | | ` default int` | ` getStability() ` | | ` abstract void` | ` writeToParcel(Parcel arg0, int arg1) ` | ||

## Constants

### IMAGE_STYLE_ICON

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

```
public static final int IMAGE_STYLE_ICON
```

Style for small images that have a transparent background and are expected to be drawn
entirely within the space available, such as a launcher icon. Watch faces may add padding
when drawing these images, but should never crop these images. Icons may be recolored to fit
the complication style.

<br />

Constant Value:

2
(0x00000002)


### IMAGE_STYLE_PHOTO

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

```
public static final int IMAGE_STYLE_PHOTO
```

Style for small images which are photos that are expected to fill the space available. Images
of this style may be cropped to fit the shape of the complication - in particular, the image
may be cropped to a circle. Photos my not be recolored.

This is the default value.

<br />

Constant Value:

1
(0x00000001)


## Fields

### CREATOR

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

```
public static final Creator<ComplicationData> CREATOR
```

<br />

<br />

## Public methods

### clearTimelineEndEpochSecond

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

```
public void clearTimelineEndEpochSecond ()
```

Removes the timeline end epoch time, if set, from this ComplicationData.

<br />

### clearTimelineStartEpochSecond

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

```
public void clearTimelineStartEpochSecond ()
```

Removes the timeline start epoch time, if set, from this ComplicationData.

<br />

### describeContents

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

```
public int describeContents ()
```

<br />

<br />

| Returns ||
|---|---|
| `int` | <br /> |

### equals

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

```
public boolean equals (Object o)
```

<br />

<br />

| Parameters ||
|---|---|
| `o` | `Object` <br /> |

| Returns ||
|---|---|
| `boolean` | <br /> |

### getBurnInProtectionIcon

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

```
public Icon getBurnInProtectionIcon ()
```

Returns the burn-in protection version of the icon field for this complication data, or
`null` if no such icon was provided. The image returned is expected to be an outline
image suitable for use in ambient mode on screens with burn-in protection. The image is also
expected to be single-color and so may be tinted to whatever color the watch face requires
(but note that `https://developer.android.com/reference/android/graphics/drawable/Drawable#mutate()` should be called before drawables are tinted, and that
the color used should be suitable for ambient mode with burn-in protection).

If the device is in ambient mode, and utilises burn-in protection, then the result of this
method must be used instead of the result of `https://developer.android.com/reference/com/google/wear/services/complications/ComplicationData#getIcon()`.

Valid for the types `https://developer.android.com/reference/androidx/wear/watchface/complications/data/ComplicationType#SHORT_TEXT`, `https://developer.android.com/reference/androidx/wear/watchface/complications/data/ComplicationType#LONG_TEXT`, `https://developer.android.com/reference/androidx/wear/watchface/complications/data/ComplicationType#RANGED_VALUE`, `https://developer.android.com/reference/androidx/wear/watchface/complications/data/ComplicationType#MONOCHROMATIC_IMAGE`, or `https://developer.android.com/reference/androidx/wear/watchface/complications/data/ComplicationType#NO_PERMISSION`, otherwise returns null.

<br />

| Returns ||
|---|---|
| `Icon` | <br /> |

### getBurnInProtectionSmallImage

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

```
public Icon getBurnInProtectionSmallImage ()
```

Returns the burn-in protection version of the small image field for this complication data,
or `null` if no such icon was provided. The image returned is expected to be an outline
image suitable for use in ambient mode on screens with burn-in protection. The image is also
expected to be single-color and so may be tinted to whatever color the watch face requires
(but note that `https://developer.android.com/reference/android/graphics/drawable/Drawable#mutate()` should be called before drawables are tinted, and that
the color used should be suitable for ambient mode with burn-in protection).

If the device is in ambient mode, and utilises burn-in protection, then the result of this
method must be used instead of the result of `https://developer.android.com/reference/com/google/wear/services/complications/ComplicationData#getSmallImage()`.

Valid for the types `https://developer.android.com/reference/androidx/wear/watchface/complications/data/ComplicationType#LONG_TEXT` and `https://developer.android.com/reference/androidx/wear/watchface/complications/data/ComplicationType#SMALL_IMAGE`. Otherwise returns null.

<br />

| Returns ||
|---|---|
| `Icon` | <br /> |

### getColorRamp

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

```
public int[] getColorRamp ()
```

Returns the colors for the progress bar.

Valid only if the type of this complication data is `https://developer.android.com/reference/com/google/wear/services/complications/reference/androidx/wear/watchface/complications/data/ComplicationType.html#RANGED_VALUE` or `https://developer.android.com/reference/androidx/wear/watchface/complications/data/ComplicationType#GOAL_PROGRESS`. If unset, returns an empty array.

<br />

| Returns ||
|---|---|
| `int[]` | <br /> |

### getContentDescription

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

```
public ComplicationText getContentDescription ()
```

Returns the content description field for this complication, for screen readers. This usually
describes the image, but may also describe the overall complication.

Valid for all non-empty types.

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/com/google/wear/services/complications/ComplicationText` | <br /> |

### getDataSource

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

```
public ComponentName getDataSource ()
```

The `https://developer.android.com/reference/android/content/ComponentName` of the ComplicationDataSourceService that provided this
ComplicationData.

<br />

| Returns ||
|---|---|
| `ComponentName` | <br /> |

### getDisplayPolicy

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

```
public int getDisplayPolicy ()
```

Returns `ComplicationDisplayPolicies.ALWAYS_DISPLAY` if not set.

<br />

| Returns ||
|---|---|
| `int` | Value is either `0` or a combination of the following: |

### getElementBackgroundColor

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

```
public int getElementBackgroundColor ()
```

Returns the background color to use between elements for this complication.

Valid only if the type of this complication data is `https://developer.android.com/reference/androidx/wear/watchface/complications/data/ComplicationType#WEIGHTED_ELEMENTS`. Otherwise returns 0.

<br />

| Returns ||
|---|---|
| `int` | <br /> |

### getElementColors

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

```
public int[] getElementColors ()
```

Returns the element colors for this complication.

Valid only if the type of this complication data is `https://developer.android.com/reference/androidx/wear/watchface/complications/data/ComplicationType#WEIGHTED_ELEMENTS`. If unset, returns an empty array.

<br />

| Returns ||
|---|---|
| `int[]` | <br /> |

### getElementWeights

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

```
public float[] getElementWeights ()
```

Returns the element weights for this complication.

Valid only if the type of this complication data is `https://developer.android.com/reference/androidx/wear/watchface/complications/data/ComplicationType#WEIGHTED_ELEMENTS`. If unset, returns an empty array.

<br />

| Returns ||
|---|---|
| `float[]` | <br /> |

### getEndDateTimeMillis

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

```
public long getEndDateTimeMillis ()
```

Returns the end time for this complication data (i.e. the last time at which it should be
considered active and displayed), this may be `Long.MAX_VALUE`. See also `https://developer.android.com/reference/com/google/wear/services/complications/ComplicationData#isActiveAtMillis(long)`.

<br />

| Returns ||
|---|---|
| `long` | <br /> |

### getExtras

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

```
public PersistableBundle getExtras ()
```

Returns the extras set in this ComplicationData.

If unset, returns an empty bundle.

<br />

| Returns ||
|---|---|
| `PersistableBundle` | <br /> |

### getIcon

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

```
public Icon getIcon ()
```

Returns the icon field for this complication data, or `null` if no value was provided
for the field. The image returned is expected to be single-color and so may be tinted to
whatever color the watch face requires (but note that `https://developer.android.com/reference/android/graphics/drawable/Drawable#mutate()` should be
called before drawables are tinted).

If the device is in ambient mode, and utilises burn-in protection, then the result of
`https://developer.android.com/reference/com/google/wear/services/complications/ComplicationData#getBurnInProtectionIcon()` must be used instead of this.

Valid for the types `https://developer.android.com/reference/androidx/wear/watchface/complications/data/ComplicationType#SHORT_TEXT`, `https://developer.android.com/reference/androidx/wear/watchface/complications/data/ComplicationType#LONG_TEXT`, `https://developer.android.com/reference/androidx/wear/watchface/complications/data/ComplicationType#RANGED_VALUE`, `https://developer.android.com/reference/androidx/wear/watchface/complications/data/ComplicationType#MONOCHROMATIC_IMAGE`, or `https://developer.android.com/reference/androidx/wear/watchface/complications/data/ComplicationType#NO_PERMISSION`, otherwise returns null.

<br />

| Returns ||
|---|---|
| `Icon` | <br /> |

### getInvalidatedData

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

```
public ComplicationData getInvalidatedData ()
```

Returns the invalidated `https://developer.android.com/reference/com/google/wear/services/complications/ComplicationData` used in `https://developer.android.com/`
when generated by dynamic value invalidation, or `null`.

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/com/google/wear/services/complications/ComplicationData` | <br /> |

### getLargeImage

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

```
public Icon getLargeImage ()
```

Returns the large image field for this complication data. This image is expected to be of a
suitable size to fill the screen of the watch.

As this may be any image, it is unlikely to be suitable for display in ambient mode when
burn-in protection is enabled, or in low-bit ambient mode, and should not be rendered under
these circumstances.

Valid only if the type of this complication data is `https://developer.android.com/reference/androidx/wear/watchface/complications/data/ComplicationType#LARGE_IMAGE`. Otherwise returns null.

<br />

| Returns ||
|---|---|
| `Icon` | <br /> |

### getLongText

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

```
public ComplicationText getLongText ()
```

Returns the longText field for this complication data.

The value is provided as a `https://developer.android.com/reference/com/google/wear/services/complications/ComplicationText` object, from which the text to display
can be obtained for a given point in time.

Valid only if the type of this complication data is `https://developer.android.com/reference/androidx/wear/watchface/complications/data/ComplicationType#LONG_TEXT`, otherwise returns null.

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/com/google/wear/services/complications/ComplicationText` | <br /> |

### getLongTitle

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

```
public ComplicationText getLongTitle ()
```

Returns the long title field for this complication data, or an empty bundle if no value was
provided for the field.

The value is provided as a `https://developer.android.com/reference/com/google/wear/services/complications/ComplicationText` object, from which the text to display
can be obtained for a given point in time.

Valid only if the type of this complication data is `https://developer.android.com/reference/androidx/wear/watchface/complications/data/ComplicationType#LONG_TEXT`, otherwise returns null.

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/com/google/wear/services/complications/ComplicationText` | <br /> |

### getPersistencePolicy

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

```
public int getPersistencePolicy ()
```

Returns `ComplicationPersistencePolicies.CACHING_ALLOWED` if not set.

<br />

| Returns ||
|---|---|
| `int` | Value is either `0` or a combination of the following: |

### getPlaceholder

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

```
public ComplicationData getPlaceholder ()
```

Returns the placeholder ComplicationData if there is one or `null`.

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/com/google/wear/services/complications/ComplicationData` | <br /> |

### getRangedDynamicValue

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

```
public ProtoLayoutDynamicFloat getRangedDynamicValue ()
```

Returns the dynamic ranged value field for this complication.

Valid only if the type of this complication data is `https://developer.android.com/reference/androidx/wear/watchface/complications/data/ComplicationType#RANGED_VALUE` and `https://developer.android.com/reference/androidx/wear/watchface/complications/data/ComplicationType#GOAL_PROGRESS`. If unset, returns null.

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/com/google/wear/expression/ProtoLayoutDynamicFloat` | <br /> |

### getRangedMaxValue

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

```
public float getRangedMaxValue ()
```

Returns the maxValue of the ranged value field for this complication.

Valid only if the type of this complication data is `https://developer.android.com/reference/androidx/wear/watchface/complications/data/ComplicationType#RANGED_VALUE`, otherwise returns zero.

<br />

| Returns ||
|---|---|
| `float` | <br /> |

### getRangedMinValue

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

```
public float getRangedMinValue ()
```

Returns the minValue of the ranged value field for this complication.

Valid only if the type of this complication data is `https://developer.android.com/reference/androidx/wear/watchface/complications/data/ComplicationType#RANGED_VALUE`, otherwise returns zero.

<br />

| Returns ||
|---|---|
| `float` | <br /> |

### getRangedValue

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

```
public float getRangedValue ()
```

Returns the ranged value field for this complication.

Valid only if the type of this complication data is `https://developer.android.com/reference/androidx/wear/watchface/complications/data/ComplicationType#RANGED_VALUE` and `https://developer.android.com/reference/androidx/wear/watchface/complications/data/ComplicationType#GOAL_PROGRESS`, otherwise returns zero.

<br />

| Returns ||
|---|---|
| `float` | <br /> |

### getRangedValueType

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

```
public int getRangedValueType ()
```

Returns the ranged value type field for this complication.

Valid only if the type of this complication data is `https://developer.android.com/reference/androidx/wear/watchface/complications/data/ComplicationType#RANGED_VALUE`, otherwise returns zero.

<br />

| Returns ||
|---|---|
| `int` | <br /> |

### getShortText

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

```
public ComplicationText getShortText ()
```

Returns the short text field for this complication data, or an empty bundle if no value was
provided for the field.

The value is provided as a `https://developer.android.com/reference/com/google/wear/services/complications/ComplicationText` object, from which the text to display
can be obtained for a given point in time.

The length of the text, including any time-dependent values at any valid time, is expected
to not exceed seven characters. When using this text, the watch face should be able to
display any string of up to seven characters (reducing the text size appropriately if the
string is very wide). Although not expected, it is possible that strings of more than seven
characters might be seen, in which case they may be truncated.

Valid only if the type of this complication data is `https://developer.android.com/reference/androidx/wear/watchface/complications/data/ComplicationType#SHORT_TEXT`, `https://developer.android.com/reference/androidx/wear/watchface/complications/data/ComplicationType#RANGED_VALUE`, or `https://developer.android.com/reference/androidx/wear/watchface/complications/data/ComplicationType#NO_PERMISSION`, otherwise returns an empty bundle.

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/com/google/wear/services/complications/ComplicationText` | <br /> |

### getShortTitle

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

```
public ComplicationText getShortTitle ()
```

Returns the short title field for this complication data, or an empty bundle if no value was
provided for the field.

The value is provided as a `https://developer.android.com/reference/com/google/wear/services/complications/ComplicationText` object, from which the text to display
can be obtained for a given point in time.

The length of the text, including any time-dependent values at any valid time, is expected
to not exceed seven characters. When using this text, the watch face should be able to
display any string of up to seven characters (reducing the text size appropriately if the
string is very wide). Although not expected, it is possible that strings of more than seven
characters might be seen, in which case they may be truncated.

Valid only if the type of this complication data is `https://developer.android.com/reference/androidx/wear/watchface/complications/data/ComplicationType#SHORT_TEXT`, `https://developer.android.com/reference/androidx/wear/watchface/complications/data/ComplicationType#RANGED_VALUE`, or `https://developer.android.com/reference/androidx/wear/watchface/complications/data/ComplicationType#NO_PERMISSION`, otherwise returns an empty bundle.

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/com/google/wear/services/complications/ComplicationText` | <br /> |

### getSmallImage

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

```
public Icon getSmallImage ()
```

Returns the small image field for this complication data, or `null` if no value was
provided for the field.

This may be either a `https://developer.android.com/reference/com/google/wear/services/complications/ComplicationData#IMAGE_STYLE_PHOTO` image, which is expected to fill the space
available, or an `https://developer.android.com/reference/com/google/wear/services/complications/ComplicationData#IMAGE_STYLE_ICON` image, which should be drawn entirely within the
space available. Use `https://developer.android.com/reference/com/google/wear/services/complications/ComplicationData#getSmallImageStyle()` to determine which of these applies.

As this may be any image, it is unlikely to be suitable for display in ambient mode when
burn-in protection is enabled, or in low-bit ambient mode, and should not be rendered under
these circumstances.

Valid for the types `https://developer.android.com/reference/androidx/wear/watchface/complications/data/ComplicationType#LONG_TEXT` and `https://developer.android.com/reference/androidx/wear/watchface/complications/data/ComplicationType#SMALL_IMAGE`. Otherwise returns null.

<br />

| Returns ||
|---|---|
| `Icon` | <br /> |

### getSmallImageStyle

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

```
public int getSmallImageStyle ()
```

Returns the small image style for this complication data.

The result of this method should be taken in to account when drawing a small image
complication.

Valid only for types that contain small images, i.e. `https://developer.android.com/reference/androidx/wear/watchface/complications/data/ComplicationType#SMALL_IMAGE`
and `https://developer.android.com/reference/androidx/wear/watchface/complications/data/ComplicationType#LONG_TEXT`. Otherwise returns zero.

<br />

| Returns ||
|---|---|
| `int` | Value is one of the following: - `https://developer.android.com/reference/com/google/wear/services/complications/ComplicationData#IMAGE_STYLE_PHOTO` - `https://developer.android.com/reference/com/google/wear/services/complications/ComplicationData#IMAGE_STYLE_ICON` |

**See also:**

- `https://developer.android.com/reference/com/google/wear/services/complications/ComplicationData#IMAGE_STYLE_PHOTO`
- `https://developer.android.com/reference/com/google/wear/services/complications/ComplicationData#IMAGE_STYLE_ICON`

### getStartDateTimeMillis

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

```
public long getStartDateTimeMillis ()
```

Returns the start time for this complication data (i.e. the first time at which it should be
considered active and displayed), this may be 0. See also `https://developer.android.com/reference/com/google/wear/services/complications/ComplicationData#isActiveAtMillis(long)`.

<br />

| Returns ||
|---|---|
| `long` | <br /> |

### getTapAction

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

```
public PendingIntent getTapAction ()
```

Returns the tap action field for this complication. The result is a `https://developer.android.com/reference/android/app/PendingIntent`
that should be fired if the complication is tapped on, assuming the complication is tappable,
or `null` if no tap action has been specified.

Valid for all non-empty types, otherwise returns null.

<br />

| Returns ||
|---|---|
| `PendingIntent` | <br /> |

### getTargetValue

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

```
public float getTargetValue ()
```

Returns the targetValue of the ranged value field for this complication.

Valid only if the type of this complication data is `https://developer.android.com/reference/androidx/wear/watchface/complications/data/ComplicationType#GOAL_PROGRESS`, otherwise returns zero.

<br />

| Returns ||
|---|---|
| `float` | <br /> |

### getTimelineEndEpochSecond

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

```
public long getTimelineEndEpochSecond ()
```

For timeline entries. The epoch second at which this timeline entry becomes invalid or `-1` if it's not set.

<br />

| Returns ||
|---|---|
| `long` | <br /> |

### getTimelineEntries

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

```
public List<ComplicationData> getTimelineEntries ()
```

Returns the list of `https://developer.android.com/reference/com/google/wear/services/complications/ComplicationData` timeline entries.

<br />

| Returns ||
|---|---|
| `List<https://developer.android.com/reference/com/google/wear/services/complications/ComplicationData>` | <br /> |

### getTimelineStartEpochSecond

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

```
public long getTimelineStartEpochSecond ()
```

For timeline entries. The epoch second at which this timeline entry becomes valid or `-1` if it's not set.

<br />

| Returns ||
|---|---|
| `long` | <br /> |

### getType

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

```
public int getType ()
```

<br />

<br />

| Returns ||
|---|---|
| `int` | Value is one of the following: |

### hasBurnInProtectionIcon

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

```
public boolean hasBurnInProtectionIcon ()
```

Returns true if the ComplicationData contains a burn in protection Icon. I.e. if `https://developer.android.com/reference/com/google/wear/services/complications/ComplicationData#getBurnInProtectionIcon()` can succeed.

<br />

| Returns ||
|---|---|
| `boolean` | <br /> |

### hasBurnInProtectionSmallImage

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

```
public boolean hasBurnInProtectionSmallImage ()
```

Returns true if the ComplicationData contains a burn in protection small image. I.e. if
`https://developer.android.com/reference/com/google/wear/services/complications/ComplicationData#getBurnInProtectionSmallImage()` can succeed.

<br />

| Returns ||
|---|---|
| `boolean` | <br /> |

### hasColorRamp

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

```
public boolean hasColorRamp ()
```

Returns true if the ComplicationData has the color ramp field set. I.e. if `https://developer.android.com/reference/com/google/wear/services/complications/ComplicationData#getColorRamp()` can succeed.

<br />

| Returns ||
|---|---|
| `boolean` | <br /> |

### hasContentDescription

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

```
public boolean hasContentDescription ()
```

Returns true if the ComplicationData contains a content description. I.e. if `https://developer.android.com/reference/com/google/wear/services/complications/ComplicationData#getContentDescription()` can succeed.

<br />

| Returns ||
|---|---|
| `boolean` | <br /> |

### hasDynamicValues

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

```
public boolean hasDynamicValues ()
```

Returns true if the complication contains a dynamic value that needs to be evaluated.

<br />

| Returns ||
|---|---|
| `boolean` | <br /> |

### hasElementBackgroundColor

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

```
public boolean hasElementBackgroundColor ()
```

Returns true if the ComplicationData contains a background color for use between elements for
this complication. I.e. if `https://developer.android.com/reference/com/google/wear/services/complications/ComplicationData#getElementBackgroundColor()` can succeed.

<br />

| Returns ||
|---|---|
| `boolean` | <br /> |

### hasElementColors

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

```
public boolean hasElementColors ()
```

Returns true if the ComplicationData contains element colors. I.e. if `https://developer.android.com/reference/com/google/wear/services/complications/ComplicationData#getElementColors()` can succeed.

<br />

| Returns ||
|---|---|
| `boolean` | <br /> |

### hasElementWeights

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

```
public boolean hasElementWeights ()
```

Returns true if the ComplicationData contains element weights. I.e. if `https://developer.android.com/reference/com/google/wear/services/complications/ComplicationData#getElementWeights()` can succeed.

<br />

| Returns ||
|---|---|
| `boolean` | <br /> |

### hasExtras

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

```
public boolean hasExtras ()
```

Returns true if extras have been set in this ComplicationData. I.e. if `https://developer.android.com/reference/com/google/wear/services/complications/ComplicationData#getExtras()`
can succeed.

<br />

| Returns ||
|---|---|
| `boolean` | <br /> |

### hasIcon

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

```
public boolean hasIcon ()
```

Returns true if the ComplicationData contains an Icon. I.e. if `https://developer.android.com/reference/com/google/wear/services/complications/ComplicationData#getIcon()` can succeed.

<br />

| Returns ||
|---|---|
| `boolean` | <br /> |

### hasInvalidatedData

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

```
public boolean hasInvalidatedData ()
```

Returns true if the ComplicationData contains a content description. I.e. if `https://developer.android.com/reference/com/google/wear/services/complications/ComplicationData#getContentDescription()` can succeed.

<br />

| Returns ||
|---|---|
| `boolean` | <br /> |

### hasIsColorRampInterpolated

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

```
public boolean hasIsColorRampInterpolated ()
```

Returns true if the ComplicationData has the isColorRampInterpolated field set. I.e. if
`https://developer.android.com/reference/com/google/wear/services/complications/ComplicationData#isColorRampInterpolated()` can succeed.

<br />

| Returns ||
|---|---|
| `boolean` | <br /> |

### hasLargeImage

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

```
public boolean hasLargeImage ()
```

Returns true if the ComplicationData contains a large image. I.e. if `https://developer.android.com/reference/com/google/wear/services/complications/ComplicationData#getLargeImage()`
can succeed.

<br />

| Returns ||
|---|---|
| `boolean` | <br /> |

### hasLongText

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

```
public boolean hasLongText ()
```

Returns true if the ComplicationData contains long text. I.e. if `https://developer.android.com/reference/com/google/wear/services/complications/ComplicationData#getLongText()` can
succeed.

<br />

| Returns ||
|---|---|
| `boolean` | <br /> |

### hasLongTitle

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

```
public boolean hasLongTitle ()
```

Returns true if the ComplicationData contains a long title. I.e. if `https://developer.android.com/reference/com/google/wear/services/complications/ComplicationData#getLongTitle()` can
succeed.

<br />

| Returns ||
|---|---|
| `boolean` | <br /> |

### hasPlaceholder

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

```
public boolean hasPlaceholder ()
```

Returns true if the ComplicationData contains a placeholder. I.e. if `https://developer.android.com/reference/com/google/wear/services/complications/ComplicationData#getPlaceholder()`
can succeed.

<br />

| Returns ||
|---|---|
| `boolean` | <br /> |

### hasRangedDynamicValue

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

```
public boolean hasRangedDynamicValue ()
```

Returns true if the ComplicationData contains a ranged dynamic value. I.e. if `https://developer.android.com/reference/com/google/wear/services/complications/ComplicationData#getRangedDynamicValue()` can succeed.

<br />

| Returns ||
|---|---|
| `boolean` | <br /> |

### hasRangedMaxValue

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

```
public boolean hasRangedMaxValue ()
```

Returns true if the ComplicationData contains a ranged max value. I.e. if `https://developer.android.com/reference/com/google/wear/services/complications/ComplicationData#getRangedMaxValue()` can succeed.

<br />

| Returns ||
|---|---|
| `boolean` | <br /> |

### hasRangedMinValue

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

```
public boolean hasRangedMinValue ()
```

Returns true if the ComplicationData contains a ranged max value. I.e. if `https://developer.android.com/reference/com/google/wear/services/complications/ComplicationData#getRangedMinValue()` can succeed.

<br />

| Returns ||
|---|---|
| `boolean` | <br /> |

### hasRangedValue

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

```
public boolean hasRangedValue ()
```

Returns true if the ComplicationData contains a ranged value. I.e. if `https://developer.android.com/reference/com/google/wear/services/complications/ComplicationData#getRangedValue()`
can succeed.

<br />

| Returns ||
|---|---|
| `boolean` | <br /> |

### hasRangedValueType

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

```
public boolean hasRangedValueType ()
```

Returns true if the ComplicationData contains a ranged max type. I.e. if `https://developer.android.com/reference/com/google/wear/services/complications/ComplicationData#getRangedValueType()` can succeed.

<br />

| Returns ||
|---|---|
| `boolean` | <br /> |

### hasShortText

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

```
public boolean hasShortText ()
```

Returns true if the ComplicationData contains short text. I.e. if `https://developer.android.com/reference/com/google/wear/services/complications/ComplicationData#getShortText()` can
succeed.

<br />

| Returns ||
|---|---|
| `boolean` | <br /> |

### hasShortTitle

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

```
public boolean hasShortTitle ()
```

Returns true if the ComplicationData contains a short title. I.e. if `https://developer.android.com/reference/com/google/wear/services/complications/ComplicationData#getShortTitle()`
can succeed.

<br />

| Returns ||
|---|---|
| `boolean` | <br /> |

### hasSmallImage

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

```
public boolean hasSmallImage ()
```

Returns true if the ComplicationData contains a small image. I.e. if `https://developer.android.com/reference/com/google/wear/services/complications/ComplicationData#getSmallImage()`
can succeed.

<br />

| Returns ||
|---|---|
| `boolean` | <br /> |

### hasTapAction

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

```
public boolean hasTapAction ()
```

Returns true if the ComplicationData contains a tap action. I.e. if `https://developer.android.com/reference/com/google/wear/services/complications/ComplicationData#getTapAction()` can
succeed.

<br />

| Returns ||
|---|---|
| `boolean` | <br /> |

### hasTargetValue

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

```
public boolean hasTargetValue ()
```

Returns true if the ComplicationData contains a ranged max value. I.e. if `https://developer.android.com/reference/com/google/wear/services/complications/ComplicationData#getTargetValue()` can succeed.

<br />

| Returns ||
|---|---|
| `boolean` | <br /> |

### hasTimelineEntries

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

```
public boolean hasTimelineEntries ()
```

Returns true if the Timeline Entries field has been set and their presence is valid for this
ComplicationData. I.e. if `https://developer.android.com/reference/com/google/wear/services/complications/ComplicationData#getTimelineEntries()` will succeed.

<br />

| Returns ||
|---|---|
| `boolean` | <br /> |

### hashCode

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

```
public int hashCode ()
```

<br />

<br />

| Returns ||
|---|---|
| `int` | <br /> |

### isActiveAtMillis

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

```
public boolean isActiveAtMillis (long dateTimeMillis)
```

Returns true if the complication is active and should be displayed at the given time. If this
returns false, the complication should not be displayed.

This must be checked for any time for which the complication will be displayed.

<br />

| Parameters ||
|---|---|
| `dateTimeMillis` | `long`: the time, in milliseconds, at which to check if the complication is active and should be displayed. <br /> |

| Returns ||
|---|---|
| `boolean` | <br /> |

### isColorRampInterpolated

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

```
public boolean isColorRampInterpolated ()
```

Returns either a boolean where: true means the color ramp colors should be smoothly
interpolated; false means the color ramp should be rendered in equal sized blocks of solid
color.

Valid only if the type of this complication data is `https://developer.android.com/reference/androidx/wear/watchface/complications/data/ComplicationType#RANGED_VALUE` or `https://developer.android.com/reference/androidx/wear/watchface/complications/data/ComplicationType#GOAL_PROGRESS`.

<br />

| Returns ||
|---|---|
| `boolean` | <br /> |

### isTapActionLostDueToSerialization

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

```
public boolean isTapActionLostDueToSerialization ()
```

TapAction unfortunately can't be serialized.

Returns true if tapAction has been lost due to serialization (e.g. due to being read from
the local cache). The next complication update from the system would replace this with one
with a tapAction.

<br />

| Returns ||
|---|---|
| `boolean` | <br /> |

### isTimeDependent

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

```
public boolean isTimeDependent ()
```

Returns true if the complication data contains at least one text field with a value that may
change based on the current time.

<br />

| Returns ||
|---|---|
| `boolean` | <br /> |

### stripExtras

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

```
public void stripExtras ()
```

Removes any extras, if set, from this ComplicationData.

<br />

### toString

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

```
public String toString ()
```

<br />

<br />

| Returns ||
|---|---|
| `String` | <br /> |

### writeToParcel

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

```
public void writeToParcel (Parcel dest, 
                int flags)
```

<br />

<br />

| Parameters ||
|---|---|
| `dest` | `Parcel` <br /> |
| `flags` | `int` <br /> |