Google is committed to advancing racial equity for Black communities. See how.

ComplicationData

sealed class ComplicationData
kotlin.Any
   ↳ androidx.wear.complications.data.ComplicationData

Base type for all different types of ComplicationData types.

Summary

Public methods
abstract WireComplicationData

Converts this value to WireComplicationData object used for serialization.

Boolean
isActiveAt(dateTimeMillis: Long)

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

Properties
PendingIntent?

ComplicationType

Public methods

asWireComplicationData

abstract fun asWireComplicationData(): WireComplicationData

Converts this value to WireComplicationData object used for serialization.

This is only needed internally to convert to the underlying communication protocol.

isActiveAt

fun isActiveAt(dateTimeMillis: Long): Boolean

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.

Properties

tapAction

val tapAction: PendingIntent?

type

val type: ComplicationType