ComplicationDataSourceService.ComplicationRequestListener


Note: As of July 10, 2024, watch faces must use the Watch Face Format in order to be installed on new watches that launch with Wear OS 5 pre-installed. Learn more about the user-facing changes in this Help Center article.

Additionally, starting in early 2025 (specific date to be announced during Q4 2024), all new watch faces published on Google Play must use the Watch Face Format.

public interface ComplicationDataSourceService.ComplicationRequestListener


Callback for onComplicationRequest where only one of onComplicationData or onComplicationDataTimeline should be called.

Summary

Public methods

abstract void

Sends the ComplicationData to the system.

default void
onComplicationDataTimeline(
    ComplicationDataTimeline complicationDataTimeline
)

Sends the ComplicationDataTimeline to the system.

Public methods

onComplicationData

Added in 1.0.0
abstract void onComplicationData(ComplicationData complicationData)

Sends the ComplicationData to the system. If null is passed then any previous complication data will not be overwritten. Can be called on any thread. Should only be called once. Note this is mutually exclusive with onComplicationDataTimeline.

onComplicationDataTimeline

Added in 1.1.0
default void onComplicationDataTimeline(
    ComplicationDataTimeline complicationDataTimeline
)

Sends the ComplicationDataTimeline to the system. If null is passed then any previous complication data will not be overwritten. Can be called on any thread. Should only be called once. Note this is mutually exclusive with onComplicationData. Note only ComplicationDataTimeline.defaultComplicationData is supported by older watch faces .