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 |
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 |
WatchFaceId
|
getWatchFaceId()
The |
int
|
getWatchFaceSlotId()
The slot id of the complication as provided by the watch face. |
int
|
hashCode()
|
String
|
toString()
|
Inherited methods | |
|---|---|
Public methods
getDataType
public int getDataType ()
The type of complication data that should be provided.
| Returns | |
|---|---|
int |
Value is one of the following:
|
getId
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
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
public WatchFaceId getWatchFaceId ()
The WatchFaceId of the watch face, used to uniquely identify it.
| Returns | |
|---|---|
WatchFaceId |
|
getWatchFaceSlotId
public int getWatchFaceSlotId ()
The slot id of the complication as provided by the watch face.
| Returns | |
|---|---|
int |
|
Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
Last updated 2026-06-11 UTC.