ComplicationDataSourceService.ComplicationRequestListener


interface ComplicationDataSourceService.ComplicationRequestListener


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

Summary

Public functions

Unit

Sends the ComplicationData to the system.

open Unit
onComplicationDataTimeline(
    complicationDataTimeline: ComplicationDataTimeline?
)

Sends the ComplicationDataTimeline to the system.

Public functions

onComplicationData

Added in 1.0.0
fun onComplicationData(complicationData: ComplicationData?): Unit

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
open fun onComplicationDataTimeline(
    complicationDataTimeline: ComplicationDataTimeline?
): Unit

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 .