ComplicationData

public final class ComplicationData
extends Object implements Parcelable

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


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 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 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 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 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 ComplicationData.Builder

Builder class for ComplicationData

Constants

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.

int IMAGE_STYLE_PHOTO

Style for small images which are photos that are expected to fill the space available.

Inherited constants

Fields

public static final Creator<ComplicationData> CREATOR

Public methods

void clearTimelineEndEpochSecond()

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

void clearTimelineStartEpochSecond()

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

int describeContents()

boolean equals(Object o)

Icon getBurnInProtectionIcon()

Returns the burn-in protection version of the icon field for this complication data, or null if no such icon was provided.

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.

int[] getColorRamp()

Returns the colors for the progress bar.

ComplicationText getContentDescription()

Returns the content description field for this complication, for screen readers.

ComponentName getDataSource()

The ComponentName of the ComplicationDataSourceService that provided this ComplicationData.

int getDisplayPolicy()

Returns the complication's complication display policy.

int getElementBackgroundColor()

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

int[] getElementColors()

Returns the element colors for this complication.

float[] getElementWeights()

Returns the element weights for this complication.

long getEndDateTimeMillis()

Returns the end time for this complication data (i.e.

PersistableBundle getExtras()

Returns the extras set in this ComplicationData.

Icon getIcon()

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

ComplicationData getInvalidatedData()

Returns the invalidated ComplicationData used in COMPLICATION_TYPE_NO_DATA when generated by dynamic value invalidation, or null.

Icon getLargeImage()

Returns the large image field for this complication data.

ComplicationText getLongText()

Returns the longText field for this complication data.

ComplicationText getLongTitle()

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

int getPersistencePolicy()

Returns the complication's persistence policy.

ComplicationData getPlaceholder()

Returns the placeholder ComplicationData if there is one or null.

ProtoLayoutDynamicFloat getRangedDynamicValue()

Returns the dynamic ranged value field for this complication.

float getRangedMaxValue()

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

float getRangedMinValue()

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

float getRangedValue()

Returns the ranged value field for this complication.

int getRangedValueType()

Returns the ranged value type field for this complication.

ComplicationText getShortText()

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

ComplicationText getShortTitle()

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

Icon getSmallImage()

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

int getSmallImageStyle()

Returns the small image style for this complication data.

long getStartDateTimeMillis()

Returns the start time for this complication data (i.e.

PendingIntent getTapAction()

Returns the tap action field for this complication.

float getTargetValue()

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

long getTimelineEndEpochSecond()

For timeline entries.

List<ComplicationData> getTimelineEntries()

Returns the list of ComplicationData timeline entries.

long getTimelineStartEpochSecond()

For timeline entries.

int getType()
boolean hasBurnInProtectionIcon()

Returns true if the ComplicationData contains a burn in protection Icon.

boolean hasBurnInProtectionSmallImage()

Returns true if the ComplicationData contains a burn in protection small image.

boolean hasColorRamp()

Returns true if the ComplicationData has the color ramp field set.

boolean hasContentDescription()

Returns true if the ComplicationData contains a content description.

boolean hasDynamicValues()

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

boolean hasElementBackgroundColor()

Returns true if the ComplicationData contains a background color for use between elements for this complication.

boolean hasElementColors()

Returns true if the ComplicationData contains element colors.

boolean hasElementWeights()

Returns true if the ComplicationData contains element weights.

boolean hasExtras()

Returns true if extras have been set in this ComplicationData.

boolean hasIcon()

Returns true if the ComplicationData contains an Icon.

boolean hasInvalidatedData()

Returns true if the ComplicationData contains a content description.

boolean hasIsColorRampInterpolated()

Returns true if the ComplicationData has the isColorRampInterpolated field set.

boolean hasLargeImage()

Returns true if the ComplicationData contains a large image.

boolean hasLongText()

Returns true if the ComplicationData contains long text.

boolean hasLongTitle()

Returns true if the ComplicationData contains a long title.

boolean hasPlaceholder()

Returns true if the ComplicationData contains a placeholder.

boolean hasRangedDynamicValue()

Returns true if the ComplicationData contains a ranged dynamic value.

boolean hasRangedMaxValue()

Returns true if the ComplicationData contains a ranged max value.

boolean hasRangedMinValue()

Returns true if the ComplicationData contains a ranged max value.

boolean hasRangedValue()

Returns true if the ComplicationData contains a ranged value.

boolean hasRangedValueType()

Returns true if the ComplicationData contains a ranged max type.

boolean hasShortText()

Returns true if the ComplicationData contains short text.

boolean hasShortTitle()

Returns true if the ComplicationData contains a short title.

boolean hasSmallImage()

Returns true if the ComplicationData contains a small image.

boolean hasTapAction()

Returns true if the ComplicationData contains a tap action.

boolean hasTargetValue()

Returns true if the ComplicationData contains a ranged max value.

boolean hasTimelineEntries()

Returns true if the Timeline Entries field has been set and their presence is valid for this ComplicationData.

int hashCode()

boolean isActiveAtMillis(long dateTimeMillis)

Returns true if the complication is active and should be displayed at the given time.

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.

boolean isTapActionLostDueToSerialization()

TapAction unfortunately can't be serialized.

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.

void stripExtras()

Removes any extras, if set, from this ComplicationData.

String toString()

void writeToParcel(Parcel dest, int flags)

Inherited methods

Constants

IMAGE_STYLE_ICON

Added in API level 36
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.

Constant Value: 2 (0x00000002)

IMAGE_STYLE_PHOTO

Added in API level 36
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.

Constant Value: 1 (0x00000001)

Fields

CREATOR

Added in API level 36
public static final Creator<ComplicationData> CREATOR

Public methods

clearTimelineEndEpochSecond

Added in API level 36
public void clearTimelineEndEpochSecond ()

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

clearTimelineStartEpochSecond

Added in API level 36
public void clearTimelineStartEpochSecond ()

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

describeContents

Added in API level 36
public int describeContents ()

Returns
int

equals

Added in API level 36
public boolean equals (Object o)

Parameters
o Object

Returns
boolean

getBurnInProtectionIcon

Added in API level 36
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 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 getIcon().

Valid for the types ComplicationType.SHORT_TEXT, ComplicationType.LONG_TEXT, ComplicationType.RANGED_VALUE, ComplicationType.MONOCHROMATIC_IMAGE, or ComplicationType.NO_PERMISSION, otherwise returns null.

Returns
Icon

getBurnInProtectionSmallImage

Added in API level 36
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 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 getSmallImage().

Valid for the types ComplicationType.LONG_TEXT and ComplicationType.SMALL_IMAGE. Otherwise returns null.

Returns
Icon

getColorRamp

Added in API level 36
public int[] getColorRamp ()

Returns the colors for the progress bar.

Valid only if the type of this complication data is ComplicationType.RANGED_VALUE or ComplicationType.GOAL_PROGRESS. If unset, returns an empty array.

Returns
int[]

getContentDescription

Added in API level 36
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.

Returns
ComplicationText

getDataSource

Added in API level 36
public ComponentName getDataSource ()

The ComponentName of the ComplicationDataSourceService that provided this ComplicationData.

Returns
ComponentName

getDisplayPolicy

Added in API level 36
public int getDisplayPolicy ()

Returns ComplicationDisplayPolicies.ALWAYS_DISPLAY if not set.

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

getElementBackgroundColor

Added in API level 36
public int getElementBackgroundColor ()

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

Valid only if the type of this complication data is ComplicationType.WEIGHTED_ELEMENTS. Otherwise returns 0.

Returns
int

getElementColors

Added in API level 36
public int[] getElementColors ()

Returns the element colors for this complication.

Valid only if the type of this complication data is ComplicationType.WEIGHTED_ELEMENTS. If unset, returns an empty array.

Returns
int[]

getElementWeights

Added in API level 36
public float[] getElementWeights ()

Returns the element weights for this complication.

Valid only if the type of this complication data is ComplicationType.WEIGHTED_ELEMENTS. If unset, returns an empty array.

Returns
float[]

getEndDateTimeMillis

Added in API level 36
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 isActiveAtMillis(long).

Returns
long

getExtras

Added in API level 36
public PersistableBundle getExtras ()

Returns the extras set in this ComplicationData.

If unset, returns an empty bundle.

Returns
PersistableBundle

getIcon

Added in API level 36
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 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 getBurnInProtectionIcon() must be used instead of this.

Valid for the types SHORT_TEXT, LONG_TEXT, RANGED_VALUE, MONOCHROMATIC_IMAGE, or NO_PERMISSION, otherwise returns null.

Returns
Icon

getInvalidatedData

Added in API level 36
public ComplicationData getInvalidatedData ()

Returns the invalidated ComplicationData used in COMPLICATION_TYPE_NO_DATA when generated by dynamic value invalidation, or null.

Returns
ComplicationData

getLargeImage

Added in API level 36
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 ComplicationType.LARGE_IMAGE. Otherwise returns null.

Returns
Icon

getLongText

Added in API level 36
public ComplicationText getLongText ()

Returns the longText field for this complication data.

The value is provided as a 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 ComplicationType.LONG_TEXT, otherwise returns null.

Returns
ComplicationText

getLongTitle

Added in API level 36
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 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 ComplicationType.LONG_TEXT, otherwise returns null.

Returns
ComplicationText

getPersistencePolicy

Added in API level 36
public int getPersistencePolicy ()

Returns ComplicationPersistencePolicies.CACHING_ALLOWED if not set.

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

getPlaceholder

Added in API level 36
public ComplicationData getPlaceholder ()

Returns the placeholder ComplicationData if there is one or null.

Returns
ComplicationData

getRangedDynamicValue

Added in API level 36
public ProtoLayoutDynamicFloat getRangedDynamicValue ()

Returns the dynamic ranged value field for this complication.

Valid only if the type of this complication data is ComplicationType.RANGED_VALUE and ComplicationType.GOAL_PROGRESS). If unset, returns null.

Returns
ProtoLayoutDynamicFloat

getRangedMaxValue

Added in API level 36
public float getRangedMaxValue ()

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

Valid only if the type of this complication data is ComplicationType.RANGED_VALUE, otherwise returns zero.

Returns
float

getRangedMinValue

Added in API level 36
public float getRangedMinValue ()

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

Valid only if the type of this complication data is ComplicationType.RANGED_VALUE, otherwise returns zero.

Returns
float

getRangedValue

Added in API level 36
public float getRangedValue ()

Returns the ranged value field for this complication.

Valid only if the type of this complication data is ComplicationType.RANGED_VALUE and ComplicationType.GOAL_PROGRESS), otherwise returns zero.

Returns
float

getRangedValueType

Added in API level 36
public int getRangedValueType ()

Returns the ranged value type field for this complication.

Valid only if the type of this complication data is ComplicationType.RANGED_VALUE, otherwise returns zero.

Returns
int

getShortText

Added in API level 36
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 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 ComplicationType.SHORT_TEXT, ComplicationType.RANGED_VALUE, or ComplicationType.NO_PERMISSION, otherwise returns an empty bundle.

Returns
ComplicationText

getShortTitle

Added in API level 36
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 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 ComplicationType.SHORT_TEXT, ComplicationType.RANGED_VALUE, or ComplicationType.NO_PERMISSION, otherwise returns an empty bundle.

Returns
ComplicationText

getSmallImage

Added in API level 36
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 IMAGE_STYLE_PHOTO image, which is expected to fill the space available, or an IMAGE_STYLE_ICON image, which should be drawn entirely within the space available. Use 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 ComplicationType.LONG_TEXT and ComplicationType.SMALL_IMAGE. Otherwise returns null.

Returns
Icon

getSmallImageStyle

Added in API level 36
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. ComplicationType.SMALL_IMAGE and ComplicationType.LONG_TEXT. Otherwise returns zero.

Returns
int Value is one of the following:

getStartDateTimeMillis

Added in API level 36
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 isActiveAtMillis(long).

Returns
long

getTapAction

Added in API level 36
public PendingIntent getTapAction ()

Returns the tap action field for this complication. The result is a 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.

Returns
PendingIntent

getTargetValue

Added in API level 36
public float getTargetValue ()

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

Valid only if the type of this complication data is ComplicationType.GOAL_PROGRESS, otherwise returns zero.

Returns
float

getTimelineEndEpochSecond

Added in API level 36
public long getTimelineEndEpochSecond ()

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

Returns
long

getTimelineEntries

Added in API level 36
public List<ComplicationData> getTimelineEntries ()

Returns the list of ComplicationData timeline entries.

Returns
List<ComplicationData>

getTimelineStartEpochSecond

Added in API level 36
public long getTimelineStartEpochSecond ()

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

Returns
long

getType

Added in API level 36
public int getType ()

Returns
int Value is one of the following:

hasBurnInProtectionIcon

Added in API level 36
public boolean hasBurnInProtectionIcon ()

Returns true if the ComplicationData contains a burn in protection Icon. I.e. if getBurnInProtectionIcon() can succeed.

Returns
boolean

hasBurnInProtectionSmallImage

Added in API level 36
public boolean hasBurnInProtectionSmallImage ()

Returns true if the ComplicationData contains a burn in protection small image. I.e. if getBurnInProtectionSmallImage() can succeed.

Returns
boolean

hasColorRamp

Added in API level 36
public boolean hasColorRamp ()

Returns true if the ComplicationData has the color ramp field set. I.e. if getColorRamp() can succeed.

Returns
boolean

hasContentDescription

Added in API level 36
public boolean hasContentDescription ()

Returns true if the ComplicationData contains a content description. I.e. if getContentDescription() can succeed.

Returns
boolean

hasDynamicValues

Added in API level 36
public boolean hasDynamicValues ()

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

Returns
boolean

hasElementBackgroundColor

Added in API level 36
public boolean hasElementBackgroundColor ()

Returns true if the ComplicationData contains a background color for use between elements for this complication. I.e. if getElementBackgroundColor() can succeed.

Returns
boolean

hasElementColors

Added in API level 36
public boolean hasElementColors ()

Returns true if the ComplicationData contains element colors. I.e. if getElementColors() can succeed.

Returns
boolean

hasElementWeights

Added in API level 36
public boolean hasElementWeights ()

Returns true if the ComplicationData contains element weights. I.e. if getElementWeights() can succeed.

Returns
boolean

hasExtras

Added in API level 36
public boolean hasExtras ()

Returns true if extras have been set in this ComplicationData. I.e. if getExtras() can succeed.

Returns
boolean

hasIcon

Added in API level 36
public boolean hasIcon ()

Returns true if the ComplicationData contains an Icon. I.e. if getIcon() can succeed.

Returns
boolean

hasInvalidatedData

Added in API level 36
public boolean hasInvalidatedData ()

Returns true if the ComplicationData contains a content description. I.e. if getContentDescription() can succeed.

Returns
boolean

hasIsColorRampInterpolated

Added in API level 36
public boolean hasIsColorRampInterpolated ()

Returns true if the ComplicationData has the isColorRampInterpolated field set. I.e. if isColorRampInterpolated() can succeed.

Returns
boolean

hasLargeImage

Added in API level 36
public boolean hasLargeImage ()

Returns true if the ComplicationData contains a large image. I.e. if getLargeImage() can succeed.

Returns
boolean

hasLongText

Added in API level 36
public boolean hasLongText ()

Returns true if the ComplicationData contains long text. I.e. if getLongText() can succeed.

Returns
boolean

hasLongTitle

Added in API level 36
public boolean hasLongTitle ()

Returns true if the ComplicationData contains a long title. I.e. if getLongTitle() can succeed.

Returns
boolean

hasPlaceholder

Added in API level 36
public boolean hasPlaceholder ()

Returns true if the ComplicationData contains a placeholder. I.e. if getPlaceholder() can succeed.

Returns
boolean

hasRangedDynamicValue

Added in API level 36
public boolean hasRangedDynamicValue ()

Returns true if the ComplicationData contains a ranged dynamic value. I.e. if getRangedDynamicValue() can succeed.

Returns
boolean

hasRangedMaxValue

Added in API level 36
public boolean hasRangedMaxValue ()

Returns true if the ComplicationData contains a ranged max value. I.e. if getRangedMaxValue() can succeed.

Returns
boolean

hasRangedMinValue

Added in API level 36
public boolean hasRangedMinValue ()

Returns true if the ComplicationData contains a ranged max value. I.e. if getRangedMinValue() can succeed.

Returns
boolean

hasRangedValue

Added in API level 36
public boolean hasRangedValue ()

Returns true if the ComplicationData contains a ranged value. I.e. if getRangedValue() can succeed.

Returns
boolean

hasRangedValueType

Added in API level 36
public boolean hasRangedValueType ()

Returns true if the ComplicationData contains a ranged max type. I.e. if getRangedValueType() can succeed.

Returns
boolean

hasShortText

Added in API level 36
public boolean hasShortText ()

Returns true if the ComplicationData contains short text. I.e. if getShortText() can succeed.

Returns
boolean

hasShortTitle

Added in API level 36
public boolean hasShortTitle ()

Returns true if the ComplicationData contains a short title. I.e. if getShortTitle() can succeed.

Returns
boolean

hasSmallImage

Added in API level 36
public boolean hasSmallImage ()

Returns true if the ComplicationData contains a small image. I.e. if getSmallImage() can succeed.

Returns
boolean

hasTapAction

Added in API level 36
public boolean hasTapAction ()

Returns true if the ComplicationData contains a tap action. I.e. if getTapAction() can succeed.

Returns
boolean

hasTargetValue

Added in API level 36
public boolean hasTargetValue ()

Returns true if the ComplicationData contains a ranged max value. I.e. if getTargetValue() can succeed.

Returns
boolean

hasTimelineEntries

Added in API level 36
public boolean hasTimelineEntries ()

Returns true if the Timeline Entries field has been set and their presence is valid for this ComplicationData. I.e. if getTimelineEntries() will succeed.

Returns
boolean

hashCode

Added in API level 36
public int hashCode ()

Returns
int

isActiveAtMillis

Added in API level 36
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.

Parameters
dateTimeMillis long: the time, in milliseconds, at which to check if the complication is active and should be displayed.

Returns
boolean

isColorRampInterpolated

Added in API level 36
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 ComplicationType.RANGED_VALUE or ComplicationType.GOAL_PROGRESS.

Returns
boolean

isTapActionLostDueToSerialization

Added in API level 36
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.

Returns
boolean

isTimeDependent

Added in API level 36
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.

Returns
boolean

stripExtras

Added in API level 36
public void stripExtras ()

Removes any extras, if set, from this ComplicationData.

toString

Added in API level 36
public String toString ()

Returns
String

writeToParcel

Added in API level 36
public void writeToParcel (Parcel dest, 
                int flags)

Parameters
dest Parcel

flags int