ComplicationSlotConfig

public final class ComplicationSlotConfig
extends Object

java.lang.Object
   ↳ com.google.wear.services.complications.ComplicationSlotConfig


Represents complication provider configuration for a given watch face slot.

Summary

Nested classes

class ComplicationSlotConfig.Builder

Builder for ComplicationSlotConfig

Public methods

boolean equals(Object o)

int getDataType()

The type of complication data that should be provided.

int getId()

The unique id of the complication.

ComponentName getProviderComponent()

The ComponentName of the androidx.wear.watchface.complications.datasource.ComplicationDataSourceService selected to supply androidx.wear.watchface.complications.data.ComplicationData for this complication.

WatchFaceId getWatchFaceId()

The WatchFaceId of the watch face, used to uniquely identify it.

int getWatchFaceSlotId()

The slot id of the complication as provided by the watch face.

int hashCode()

String toString()

Inherited methods

Public methods

equals

Added in version 35.1
public boolean equals (Object o)

Parameters
o Object

Returns
boolean

getDataType

Added in version 35.1
public int getDataType ()

The type of complication data that should be provided.

Returns
int Value is one of the following:

getId

Added in version 35.1
public int getId ()

The unique id of the complication. This is the id seen by providers. It is unique across all complications.

This ID is not the same as the WatchFace's slot ID, and the WatchFace is not aware of this ID.

Returns
int

getProviderComponent

Added in version 35.1
public ComponentName getProviderComponent ()

The ComponentName of the androidx.wear.watchface.complications.datasource.ComplicationDataSourceService selected to supply androidx.wear.watchface.complications.data.ComplicationData for this complication.

Returns null if the slot is empty, i.e. getDataType() is NOT_CONFIGURED or EMPTY.

Returns
ComponentName

getWatchFaceId

Added in version 35.1
public WatchFaceId getWatchFaceId ()

The WatchFaceId of the watch face, used to uniquely identify it.

Returns
WatchFaceId

getWatchFaceSlotId

Added in version 35.1
public int getWatchFaceSlotId ()

The slot id of the complication as provided by the watch face.

Returns
int

hashCode

Added in version 35.1
public int hashCode ()

Returns
int

toString

Added in version 35.1
public String toString ()

Returns
String