ComplicationDataSourceService.ComplicationRequestListener


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 .