# ChosenComplicationDataSource

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

*** ** * ** ***


```
public final class ChosenComplicationDataSource
```

<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

The complication data source that was chosen by the user for a given `https://developer.android.com/reference/androidx/wear/watchface/ComplicationSlot` id as a result to a call to `https://developer.android.com/reference/androidx/wear/watchface/editor/EditorSession#openComplicationDataSourceChooser(kotlin.Int)`.

use Watch Face Format instead

## Summary

| ### Public constructors |
|---|
| `[ChosenComplicationDataSource](https://developer.android.com/reference/androidx/wear/watchface/editor/ChosenComplicationDataSource#ChosenComplicationDataSource(kotlin.Int,androidx.wear.watchface.complications.ComplicationDataSourceInfo,android.os.Bundle))( int complicationSlotId, https://developer.android.com/reference/androidx/wear/watchface/complications/ComplicationDataSourceInfo complicationDataSourceInfo, @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/os/Bundle.html extras )` **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/complications/ComplicationDataSourceInfo` | `[getComplicationDataSourceInfo](https://developer.android.com/reference/androidx/wear/watchface/editor/ChosenComplicationDataSource#getComplicationDataSourceInfo())()` **This method is deprecated.** AndroidX watchface libraries are deprecated, use Watch Face Format instead. |
| `final int` | `[getComplicationSlotId](https://developer.android.com/reference/androidx/wear/watchface/editor/ChosenComplicationDataSource#getComplicationSlotId())()` **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` | `[getExtras](https://developer.android.com/reference/androidx/wear/watchface/editor/ChosenComplicationDataSource#getExtras())()` **This method is deprecated.** AndroidX watchface libraries are deprecated, use Watch Face Format instead. |
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/String.html` | `[toString](https://developer.android.com/reference/androidx/wear/watchface/editor/ChosenComplicationDataSource#toString())()` **This method is deprecated.** AndroidX watchface libraries are deprecated, use Watch Face Format instead. |

## Public constructors

### ChosenComplicationDataSource

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

```
public [ChosenComplicationDataSource](https://developer.android.com/reference/androidx/wear/watchface/editor/ChosenComplicationDataSource#ChosenComplicationDataSource(kotlin.Int,androidx.wear.watchface.complications.ComplicationDataSourceInfo,android.os.Bundle))(
    int complicationSlotId,
    ComplicationDataSourceInfo complicationDataSourceInfo,
    @NonNull Bundle extras
)
```

> [!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

| Parameters |
|---|---|
| `int complicationSlotId` | The ID of the complication slot that was configured. |
| `https://developer.android.com/reference/androidx/wear/watchface/complications/ComplicationDataSourceInfo complicationDataSourceInfo` | The complication data source that was chosen for this slot, or `null` if the empty complication source was was chosen. |
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/os/Bundle.html extras` | Any additional extras returned by the complication data source chooser. |

## Public methods

### getComplicationDataSourceInfo

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

```
public final ComplicationDataSourceInfo [getComplicationDataSourceInfo](https://developer.android.com/reference/androidx/wear/watchface/editor/ChosenComplicationDataSource#getComplicationDataSourceInfo())()
```

> [!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 data source that was chosen for this slot, or `null` if the empty complication source was was chosen.

### getComplicationSlotId

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

```
public final int [getComplicationSlotId](https://developer.android.com/reference/androidx/wear/watchface/editor/ChosenComplicationDataSource#getComplicationSlotId())()
```

> [!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 ID of the complication slot that was configured.

### getExtras

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

```
public final @NonNull Bundle [getExtras](https://developer.android.com/reference/androidx/wear/watchface/editor/ChosenComplicationDataSource#getExtras())()
```

> [!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

Any additional extras returned by the complication data source chooser.

### toString

```
public @NonNull String [toString](https://developer.android.com/reference/androidx/wear/watchface/editor/ChosenComplicationDataSource#toString())()
```

> [!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