ComplicationData

public class ComplicationData

Known direct subclasses
EmptyComplicationData

Type sent when the user has specified that an active complication should have no complication data source, i.e.

LongTextComplicationData

Type used for complications where the primary piece of data is a piece of text.

MonochromaticImageComplicationData

Type used for complications which consist only of a MonochromaticImage.

NoDataComplicationData

Type that can be sent by any complication data source, regardless of the configured type, when the complication data source has no data to be displayed.

NoPermissionComplicationData

Type sent by the system when the watch face does not have permission to receive complication data.

NotConfiguredComplicationData

Type sent when a complication does not have a complication data source configured.

PhotoImageComplicationData

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

RangedValueComplicationData

Type used for complications including a numerical value within a range, such as a percentage.

ShortTextComplicationData

Type used for complications where the primary piece of data is a short piece of text (expected to be no more than seven characters in length).

SmallImageComplicationData

Type used for complications which consist only of a SmallImage.


Base type for all different types of ComplicationData types.

Please note to aid unit testing of ComplicationDataSourceServices, equals, hashCode and toString have been overridden for all the types of ComplicationData, however due to the embedded Icon class we have to fall back to reference equality and hashing below API 28 and also for the Icons that don't use either a resource or a uri (these should be rare but they can exist).

Summary

Public fields

final PendingIntent
final boolean

tapAction which is a PendingIntent unfortunately can't be serialized.

final @NonNull ComplicationType
final @NonNull TimeRange</