ComplicationManager

public class ComplicationManager
extends Object

java.lang.Object
   ↳ android.support.wearable.complications.ComplicationManager


Allows providers to interact with the complications system.

Providers will receive an instance of this class in calls to onComplicationActivated and onComplicationUpdate.

Summary

Public methods

void noUpdateRequired(int complicationId)

Informs the system that no update is required after an update request.

void updateComplicationData(int complicationId, ComplicationData data)

Updates complication data for the given complicationId.

Inherited methods

From class java.lang.Object

Public methods

noUpdateRequired

void noUpdateRequired (int complicationId)

Informs the system that no update is required after an update request. This means that the complication will continue to display the previous value, which may be TYPE_NO_DATA if no data has ever been sent.

A provider service should always call either this method or updateComplicationData(int, ComplicationData) in response to an update request from the system.

Parameters
complicationId int

updateComplicationData

void updateComplicationData (int complicationId, 
                ComplicationData data)

Updates complication data for the given complicationId. The type of data provided must either match the configured type for the given complication, or should be of TYPE_NO_DATA.

If no update is required (meaning that the complication will continue to display the previous value, which may be TYPE_NO_DATA if no data has ever been sent), then null may be passed as the data (noUpdateRequired(int) may be called to have the same effect).

A provider service should always call either this method or noUpdateRequired(int) in response to an update request from the system.

Parameters
complicationId int

data ComplicationData