ComplicationDataSourceService.ComplicationRequestListener

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

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

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 .