# ComplicationSlotMetadata

Artifact: [androidx.wear.watchface:watchface-client](https://developer.android.com/jetpack/androidx/releases/wear-watchface) [View Source](https://cs.android.com/search?q=file:androidx/wear/watchface/client/WatchFaceMetadataClient.kt+class:androidx.wear.watchface.client.ComplicationSlotMetadata) Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/wear-watchface#1.1.0) Deprecated in [1.3.0-alpha07](https://developer.android.com/jetpack/androidx/releases/wear-watchface#1.3.0-alpha07)

*** ** * ** ***


```
public final class ComplicationSlotMetadata
```

<br />

*** ** * ** ***

> [!CAUTION]
> **This class is deprecated.**   
> AndroidX watchface libraries are deprecated, use Watch Face Format instead. For more info see: https://developer.android.com/training/wearables/wff

Static metadata for a `https://developer.android.com/reference/androidx/wear/watchface/ComplicationSlot`.

use Watch Face Format instead

## Summary

| ### Public constructors |
|---|
| `[ComplicationSlotMetadata](https://developer.android.com/reference/androidx/wear/watchface/client/ComplicationSlotMetadata#ComplicationSlotMetadata(androidx.wear.watchface.complications.ComplicationSlotBounds,kotlin.Int,kotlin.collections.List,androidx.wear.watchface.complications.DefaultComplicationDataSourcePolicy,kotlin.Boolean,kotlin.Boolean,android.os.Bundle))( https://developer.android.com/reference/androidx/wear/watchface/complications/ComplicationSlotBounds bounds, int boundsType, @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/util/List.html<@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/wear/watchface/complications/data/ComplicationType> supportedTypes, @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/wear/watchface/complications/DefaultComplicationDataSourcePolicy defaultDataSourcePolicy, boolean isInitiallyEnabled, boolean fixedComplicationDataSource, @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/os/Bundle.html complicationConfigExtras )` **This method is deprecated.** AndroidX watchface libraries are deprecated, use Watch Face Format instead. |
| `@https://developer.android.com/reference/androidx/wear/watchface/complications/data/ComplicationExperimental [ComplicationSlotMetadata](https://developer.android.com/reference/androidx/wear/watchface/client/ComplicationSlotMetadata#ComplicationSlotMetadata(androidx.wear.watchface.complications.ComplicationSlotBounds,kotlin.Int,kotlin.collections.List,androidx.wear.watchface.complications.DefaultComplicationDataSourcePolicy,kotlin.Boolean,kotlin.Boolean,android.os.Bundle,androidx.wear.watchface.BoundingArc))( https://developer.android.com/reference/androidx/wear/watchface/complications/ComplicationSlotBounds bounds, int boundsType, @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/util/List.html<@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/wear/watchface/complications/data/ComplicationType> supportedTypes, @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/wear/watchface/complications/DefaultComplicationDataSourcePolicy defaultDataSourcePolicy, boolean isInitiallyEnabled, boolean fixedComplicationDataSource, @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/os/Bundle.html complicationConfigExtras, https://developer.android.com/reference/androidx/wear/watchface/BoundingArc boundingArc )` **This method is deprecated.** AndroidX watchface libraries are deprecated, use Watch Face Format instead. |

| ### Public methods |
|---|---|
| `final https://developer.android.com/reference/androidx/wear/watchface/BoundingArc` | `@https://developer.android.com/reference/androidx/wear/watchface/complications/data/ComplicationExperimental [getBoundingArc](https://developer.android.com/reference/androidx/wear/watchface/client/ComplicationSlotMetadata#getBoundingArc())()` **This method is deprecated.** AndroidX watchface libraries are deprecated, use Watch Face Format instead. |
| `final https://developer.android.com/reference/androidx/wear/watchface/complications/ComplicationSlotBounds` | `[getBounds](https://developer.android.com/reference/androidx/wear/watchface/client/ComplicationSlotMetadata#getBounds())()` **This method is deprecated.** AndroidX watchface libraries are deprecated, use Watch Face Format instead. |
| `final int` | `[getBoundsType](https://developer.android.com/reference/androidx/wear/watchface/client/ComplicationSlotMetadata#getBoundsType())()` **This method is deprecated.** AndroidX watchface libraries are deprecated, use Watch Face Format instead. |
| `final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/os/Bundle.html` | `[getComplicationConfigExtras](https://developer.android.com/reference/androidx/wear/watchface/client/ComplicationSlotMetadata#getComplicationConfigExtras())()` **This method is deprecated.** AndroidX watchface libraries are deprecated, use Watch Face Format instead. |
| `final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/wear/watchface/complications/DefaultComplicationDataSourcePolicy` | `[getDefaultDataSourcePolicy](https://developer.android.com/reference/androidx/wear/watchface/client/ComplicationSlotMetadata#getDefaultDataSourcePolicy())()` **This method is deprecated.** AndroidX watchface libraries are deprecated, use Watch Face Format instead. |
| `final boolean` | `[getFixedComplicationDataSource](https://developer.android.com/reference/androidx/wear/watchface/client/ComplicationSlotMetadata#getFixedComplicationDataSource())()` **This method is deprecated.** AndroidX watchface libraries are deprecated, use Watch Face Format instead. |
| `final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/util/List.html<@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/wear/watchface/complications/data/ComplicationType>` | `[getSupportedTypes](https://developer.android.com/reference/androidx/wear/watchface/client/ComplicationSlotMetadata#getSupportedTypes())()` **This method is deprecated.** AndroidX watchface libraries are deprecated, use Watch Face Format instead. |
| `final boolean` | `[isInitiallyEnabled](https://developer.android.com/reference/androidx/wear/watchface/client/ComplicationSlotMetadata#isInitiallyEnabled())()` **This method is deprecated.** AndroidX watchface libraries are deprecated, use Watch Face Format instead. |

## Public constructors

### ComplicationSlotMetadata

```
public [ComplicationSlotMetadata](https://developer.android.com/reference/androidx/wear/watchface/client/ComplicationSlotMetadata#ComplicationSlotMetadata(androidx.wear.watchface.complications.ComplicationSlotBounds,kotlin.Int,kotlin.collections.List,androidx.wear.watchface.complications.DefaultComplicationDataSourcePolicy,kotlin.Boolean,kotlin.Boolean,android.os.Bundle))(
    ComplicationSlotBounds bounds,
    int boundsType,
    @NonNull List<@NonNull ComplicationType> supportedTypes,
    @NonNull DefaultComplicationDataSourcePolicy defaultDataSourcePolicy,
    boolean isInitiallyEnabled,
    boolean fixedComplicationDataSource,
    @NonNull Bundle complicationConfigExtras
)
```

> [!CAUTION]
> **This method is deprecated.**   
> AndroidX watchface libraries are deprecated, use Watch Face Format instead. For more info see: https://developer.android.com/training/wearables/wff

Constructs a `https://developer.android.com/reference/androidx/wear/watchface/client/ComplicationSlotMetadata`.

| Parameters |
|---|---|
| `https://developer.android.com/reference/androidx/wear/watchface/complications/ComplicationSlotBounds bounds` | The complication slot's `https://developer.android.com/reference/androidx/wear/watchface/complications/ComplicationSlotBounds`. Only non `null` for watch faces with a new enough . |
| `int boundsType` | The `https://developer.android.com/reference/androidx/wear/watchface/ComplicationSlotBoundsTypeIntDef` of the complication slot. Value is one of the following: - `0` - `1` - `2` <br /> |
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/util/List.html<@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/wear/watchface/complications/data/ComplicationType> supportedTypes` | The list of `https://developer.android.com/reference/androidx/wear/watchface/complications/data/ComplicationType`s accepted by this complication slot. Used during complication data source selection, this list should be non-empty. |
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/wear/watchface/complications/DefaultComplicationDataSourcePolicy defaultDataSourcePolicy` | The `https://developer.android.com/reference/androidx/wear/watchface/complications/DefaultComplicationDataSourcePolicy` which controls the initial complication data source when the watch face is first installed. |
| `boolean isInitiallyEnabled` | At creation a complication slot is either enabled or disabled. This can be overridden by a `https://developer.android.com/reference/androidx/wear/watchface/style/UserStyleSetting.ComplicationSlotsUserStyleSetting` (see `https://developer.android.com/reference/androidx/wear/watchface/style/UserStyleSetting.ComplicationSlotsUserStyleSetting.ComplicationSlotOverlay#enabled()`). Editors need to know the initial state of a complication slot to predict the effects of making a style change. |
| `boolean fixedComplicationDataSource` | Whether or not the complication slot's complication data source is fixed (i.e. can't be changed by the user). This is useful for watch faces built around specific complication complication data sources. |
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/os/Bundle.html complicationConfigExtras` | Extras to be merged into the Intent sent when invoking the complication data source chooser activity. |

### ComplicationSlotMetadata

```
@ComplicationExperimental
public [ComplicationSlotMetadata](https://developer.android.com/reference/androidx/wear/watchface/client/ComplicationSlotMetadata#ComplicationSlotMetadata(androidx.wear.watchface.complications.ComplicationSlotBounds,kotlin.Int,kotlin.collections.List,androidx.wear.watchface.complications.DefaultComplicationDataSourcePolicy,kotlin.Boolean,kotlin.Boolean,android.os.Bundle,androidx.wear.watchface.BoundingArc))(
    ComplicationSlotBounds bounds,
    int boundsType,
    @NonNull List<@NonNull ComplicationType> supportedTypes,
    @NonNull DefaultComplicationDataSourcePolicy defaultDataSourcePolicy,
    boolean isInitiallyEnabled,
    boolean fixedComplicationDataSource,
    @NonNull Bundle complicationConfigExtras,
    BoundingArc boundingArc
)
```

> [!CAUTION]
> **This method is deprecated.**   
> AndroidX watchface libraries are deprecated, use Watch Face Format instead. For more info see: https://developer.android.com/training/wearables/wff

## Public methods

### getBoundingArc

Added in [1.2.0](https://developer.android.com/jetpack/androidx/releases/wear-watchface#1.2.0) Deprecated in [1.3.0-alpha07](https://developer.android.com/jetpack/androidx/releases/wear-watchface#1.3.0-alpha07)

```
@ComplicationExperimental
public final BoundingArc [getBoundingArc](https://developer.android.com/reference/androidx/wear/watchface/client/ComplicationSlotMetadata#getBoundingArc())()
```

> [!CAUTION]
> **This method is deprecated.**   
> AndroidX watchface libraries are deprecated, use Watch Face Format instead. For more info see: https://developer.android.com/training/wearables/wff

The optional `https://developer.android.com/reference/androidx/wear/watchface/BoundingArc` for an edge complication if specified, or `null` otherwise.

### getBounds

Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/wear-watchface#1.1.0) Deprecated in [1.3.0-alpha07](https://developer.android.com/jetpack/androidx/releases/wear-watchface#1.3.0-alpha07)

```
public final ComplicationSlotBounds [getBounds](https://developer.android.com/reference/androidx/wear/watchface/client/ComplicationSlotMetadata#getBounds())()
```

> [!CAUTION]
> **This method is deprecated.**   
> AndroidX watchface libraries are deprecated, use Watch Face Format instead. For more info see: https://developer.android.com/training/wearables/wff

The complication slot's `https://developer.android.com/reference/androidx/wear/watchface/complications/ComplicationSlotBounds`. Only non `null` for watch faces with a new enough .

### getBoundsType

Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/wear-watchface#1.1.0) Deprecated in [1.3.0-alpha07](https://developer.android.com/jetpack/androidx/releases/wear-watchface#1.3.0-alpha07)

```
public final int [getBoundsType](https://developer.android.com/reference/androidx/wear/watchface/client/ComplicationSlotMetadata#getBoundsType())()
```

> [!CAUTION]
> **This method is deprecated.**   
> AndroidX watchface libraries are deprecated, use Watch Face Format instead. For more info see: https://developer.android.com/training/wearables/wff

The `https://developer.android.com/reference/androidx/wear/watchface/ComplicationSlotBoundsTypeIntDef` of the complication slot.

### getComplicationConfigExtras

Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/wear-watchface#1.1.0) Deprecated in [1.3.0-alpha07](https://developer.android.com/jetpack/androidx/releases/wear-watchface#1.3.0-alpha07)

```
public final @NonNull Bundle [getComplicationConfigExtras](https://developer.android.com/reference/androidx/wear/watchface/client/ComplicationSlotMetadata#getComplicationConfigExtras())()
```

> [!CAUTION]
> **This method is deprecated.**   
> AndroidX watchface libraries are deprecated, use Watch Face Format instead. For more info see: https://developer.android.com/training/wearables/wff

Extras to be merged into the Intent sent when invoking the complication data source chooser activity.

### getDefaultDataSourcePolicy

Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/wear-watchface#1.1.0) Deprecated in [1.3.0-alpha07](https://developer.android.com/jetpack/androidx/releases/wear-watchface#1.3.0-alpha07)

```
public final @NonNull DefaultComplicationDataSourcePolicy [getDefaultDataSourcePolicy](https://developer.android.com/reference/androidx/wear/watchface/client/ComplicationSlotMetadata#getDefaultDataSourcePolicy())()
```

> [!CAUTION]
> **This method is deprecated.**   
> AndroidX watchface libraries are deprecated, use Watch Face Format instead. For more info see: https://developer.android.com/training/wearables/wff

The `https://developer.android.com/reference/androidx/wear/watchface/complications/DefaultComplicationDataSourcePolicy` which controls the initial complication data source when the watch face is first installed.

### getFixedComplicationDataSource

Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/wear-watchface#1.1.0) Deprecated in [1.3.0-alpha07](https://developer.android.com/jetpack/androidx/releases/wear-watchface#1.3.0-alpha07)

```
public final boolean [getFixedComplicationDataSource](https://developer.android.com/reference/androidx/wear/watchface/client/ComplicationSlotMetadata#getFixedComplicationDataSource())()
```

> [!CAUTION]
> **This method is deprecated.**   
> AndroidX watchface libraries are deprecated, use Watch Face Format instead. For more info see: https://developer.android.com/training/wearables/wff

Whether or not the complication slot's complication data source is fixed (i.e. can't be changed by the user). This is useful for watch faces built around specific complication complication data sources.

### getSupportedTypes

Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/wear-watchface#1.1.0) Deprecated in [1.3.0-alpha07](https://developer.android.com/jetpack/androidx/releases/wear-watchface#1.3.0-alpha07)

```
public final @NonNull List<@NonNull ComplicationType> [getSupportedTypes](https://developer.android.com/reference/androidx/wear/watchface/client/ComplicationSlotMetadata#getSupportedTypes())()
```

> [!CAUTION]
> **This method is deprecated.**   
> AndroidX watchface libraries are deprecated, use Watch Face Format instead. For more info see: https://developer.android.com/training/wearables/wff

The list of `https://developer.android.com/reference/androidx/wear/watchface/complications/data/ComplicationType`s accepted by this complication slot. Used during complication data source selection, this list should be non-empty.

### isInitiallyEnabled

Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/wear-watchface#1.1.0) Deprecated in [1.3.0-alpha07](https://developer.android.com/jetpack/androidx/releases/wear-watchface#1.3.0-alpha07)

```
public final boolean [isInitiallyEnabled](https://developer.android.com/reference/androidx/wear/watchface/client/ComplicationSlotMetadata#isInitiallyEnabled())()
```

> [!CAUTION]
> **This method is deprecated.**   
> AndroidX watchface libraries are deprecated, use Watch Face Format instead. For more info see: https://developer.android.com/training/wearables/wff

At creation a complication slot is either enabled or disabled. This can be overridden by a `https://developer.android.com/reference/androidx/wear/watchface/style/UserStyleSetting.ComplicationSlotsUserStyleSetting` (see `https://developer.android.com/reference/androidx/wear/watchface/style/UserStyleSetting.ComplicationSlotsUserStyleSetting.ComplicationSlotOverlay#enabled()`). Editors need to know the initial state of a complication slot to predict the effects of making a style change.