# SystemDataSources

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

*** ** * ** ***


```
public final class SystemDataSources
```

<br />

*** ** * ** ***

Methods to retrieve the component names for system complication data sources. This will allow these complication data sources to be used as defaults by watch faces.

## Summary

| ### Constants |
|---|---|
| `static final int` | `https://developer.android.com/reference/androidx/wear/watchface/complications/SystemDataSources#DATA_SOURCE_APP_SHORTCUT() = 6` Id for the 'app shortcut' complication data source. |
| `static final int` | `https://developer.android.com/reference/androidx/wear/watchface/complications/SystemDataSources#DATA_SOURCE_DATE() = 2` Id for the 'date' complication data source. |
| `static final int` | `https://developer.android.com/reference/androidx/wear/watchface/complications/SystemDataSources#DATA_SOURCE_DAY_AND_DATE() = 16` Id for the 'day and date' complication data source. |
| `static final int` | `https://developer.android.com/reference/androidx/wear/watchface/complications/SystemDataSources#DATA_SOURCE_DAY_OF_WEEK() = 13` Id for the 'day of week' complication data source. |
| `static final int` | `https://developer.android.com/reference/androidx/wear/watchface/complications/SystemDataSources#DATA_SOURCE_FAVORITE_CONTACT() = 14` Id for the 'favorite contact' complication data source. |
| `static final int` | `@https://developer.android.com/reference/androidx/annotation/RequiresApi(value = 34) https://developer.android.com/reference/androidx/wear/watchface/complications/SystemDataSources#DATA_SOURCE_HEART_RATE() = 17` Id for the 'heart rate' complication data source. |
| `static final int` | `https://developer.android.com/reference/androidx/wear/watchface/complications/SystemDataSources#DATA_SOURCE_NEXT_EVENT() = 9` Id for the 'next event' complication data source. |
| `static final int` | `https://developer.android.com/reference/androidx/wear/watchface/complications/SystemDataSources#DATA_SOURCE_STEP_COUNT() = 4` Id for the 'step count' complication data source. |
| `static final int` | `https://developer.android.com/reference/androidx/wear/watchface/complications/SystemDataSources#DATA_SOURCE_SUNRISE_SUNSET() = 12` Id for the 'sunrise sunset' complication data source. |
| `static final int` | `https://developer.android.com/reference/androidx/wear/watchface/complications/SystemDataSources#DATA_SOURCE_TIME_AND_DATE() = 3` Id for the 'time and date' complication data source. |
| `static final int` | `https://developer.android.com/reference/androidx/wear/watchface/complications/SystemDataSources#DATA_SOURCE_UNREAD_NOTIFICATION_COUNT() = 7` Id for the 'unread notification count' complication data source. |
| `static final int` | `https://developer.android.com/reference/androidx/wear/watchface/complications/SystemDataSources#DATA_SOURCE_WATCH_BATTERY() = 1` Id for the 'watch battery' complication data source. |
| `static final int` | `https://developer.android.com/reference/androidx/wear/watchface/complications/SystemDataSources#DATA_SOURCE_WORLD_CLOCK() = 5` Id for the 'world clock' complication data source. |
| `static final int` | `https://developer.android.com/reference/androidx/wear/watchface/complications/SystemDataSources#NO_DATA_SOURCE()` Specifies that no complication data source should be used. |

## Constants

### DATA_SOURCE_APP_SHORTCUT

```
public static final int DATA_SOURCE_APP_SHORTCUT = 6
```

Id for the 'app shortcut' complication data source.

This is a safe complication data source, so if a watch face uses this as a default it will be able to receive data from it even before the RECEIVE_COMPLICATION_DATA permission has been granted.

This complication data source supports the following types: `https://developer.android.com/reference/androidx/wear/watchface/complications/data/ComplicationType#SMALL_IMAGE`, `https://developer.android.com/reference/androidx/wear/watchface/complications/data/ComplicationType#LONG_TEXT`.

### DATA_SOURCE_DATE

```
public static final int DATA_SOURCE_DATE = 2
```

Id for the 'date' complication data source.

This is a safe complication data source, so if a watch face uses this as a default it will be able to receive data from it even before the RECEIVE_COMPLICATION_DATA permission has been granted.

This complication data source supports only `https://developer.android.com/reference/androidx/wear/watchface/complications/data/ComplicationType#SHORT_TEXT`.

### DATA_SOURCE_DAY_AND_DATE

```
public static final int DATA_SOURCE_DAY_AND_DATE = 16
```

Id for the 'day and date' complication data source.

This is a safe complication data source, so if a watch face uses this as a default it will be able to receive data from it even before the RECEIVE_COMPLICATION_DATA permission has been granted.

This complication data source supports only `https://developer.android.com/reference/androidx/wear/watchface/complications/data/ComplicationType#SHORT_TEXT`.

### DATA_SOURCE_DAY_OF_WEEK

```
public static final int DATA_SOURCE_DAY_OF_WEEK = 13
```

Id for the 'day of week' complication data source.

This is a safe complication data source, so if a watch face uses this as a default it will be able to receive data from it even before the RECEIVE_COMPLICATION_DATA permission has been granted.

This complication data source supports only `https://developer.android.com/reference/androidx/wear/watchface/complications/data/ComplicationType#SHORT_TEXT`.

### DATA_SOURCE_FAVORITE_CONTACT

```
public static final int DATA_SOURCE_FAVORITE_CONTACT = 14
```

Id for the 'favorite contact' complication data source.

This is not a safe complication data source, so if a watch face uses this as a default it will receive data of TYPE_NO_PERMISSION until the user has granted the RECEIVE_COMPLICATION_DATA.

This complication data source is guaranteed to support only `https://developer.android.com/reference/androidx/wear/watchface/complications/data/ComplicationType#SMALL_IMAGE`.

Starting in Wear OS 5, this complication data source can only be configured with ComplicationType.ICON type, if used in a watch face that isn't built using Watch Face Format. Depending on the device manufacturer, this data source in ComplicationType.ICON type may or may not be available.

### DATA_SOURCE_HEART_RATE

```
@RequiresApi(value = 34)
public static final int DATA_SOURCE_HEART_RATE = 17
```

Id for the 'heart rate' complication data source.

This complication data source is only guaranteed to support `https://developer.android.com/reference/androidx/wear/watchface/complications/data/ComplicationType#SHORT_TEXT` although it's a good idea for the slot to support `https://developer.android.com/reference/androidx/wear/watchface/complications/data/ComplicationType#SMALL_IMAGE` and ComplicationType.ICON too since OEMs may choose to serve a shortcut to their health app instead of the live value.

Starting in Wear OS 5, this complication data source can only be configured with ComplicationType.ICON type, if used in a watch face that isn't built using Watch Face Format. Depending on the device manufacturer, this data source in ComplicationType.ICON type may or may not be available.

### DATA_SOURCE_NEXT_EVENT

```
public static final int DATA_SOURCE_NEXT_EVENT = 9
```

Id for the 'next event' complication data source.

This is not a safe complication data source, so if a watch face uses this as a default it will receive data of TYPE_NO_PERMISSION until the user has granted the RECEIVE_COMPLICATION_DATA.

This complication data source is guaranteed to support the following types: `https://developer.android.com/reference/androidx/wear/watchface/complications/data/ComplicationType#SHORT_TEXT`, `https://developer.android.com/reference/androidx/wear/watchface/complications/data/ComplicationType#LONG_TEXT`.

Starting in Wear OS 5, this complication data source can only be configured with ComplicationType.ICON type, if used in a watch face that isn't built using Watch Face Format. Depending on the device manufacturer, this data source in ComplicationType.ICON type may or may not be available.

### DATA_SOURCE_STEP_COUNT

```
public static final int DATA_SOURCE_STEP_COUNT = 4
```

Id for the 'step count' complication data source.

This is a safe complication data source (because it only shows a daily total), so if a watch face uses this as a default it will be able to receive data from it even before the RECEIVE_COMPLICATION_DATA permission has been granted.

This complication data source is only guaranteed to support `https://developer.android.com/reference/androidx/wear/watchface/complications/data/ComplicationType#SHORT_TEXT` and `https://developer.android.com/reference/androidx/wear/watchface/complications/data/ComplicationType#GOAL_PROGRESS`, although it's a good idea for the slot to support `https://developer.android.com/reference/androidx/wear/watchface/complications/data/ComplicationType#SMALL_IMAGE` and ComplicationType.ICON too since OEMs may choose to serve a shortcut to their health app instead of the live value.

Starting in Wear OS 5, this complication data source can only be configured with ComplicationType.ICON type, if used in a watch face that isn't built using Watch Face Format. Depending on the device manufacturer, this data source in ComplicationType.ICON type may or may not be available.

### DATA_SOURCE_SUNRISE_SUNSET

```
public static final int DATA_SOURCE_SUNRISE_SUNSET = 12
```

Id for the 'sunrise sunset' complication data source.

This complication data source shows next sunrise or sunset time according to current timezone and location.

This complication data source is guaranteed to support only `https://developer.android.com/reference/androidx/wear/watchface/complications/data/ComplicationType#SHORT_TEXT`.

Starting in Wear OS 5, this complication data source can only be configured with ComplicationType.ICON type, if used in a watch face that isn't built using Watch Face Format. Depending on the device manufacturer, this data source in ComplicationType.ICON type may or may not be available.

### DATA_SOURCE_TIME_AND_DATE

```
public static final int DATA_SOURCE_TIME_AND_DATE = 3
```

Id for the 'time and date' complication data source.

This is a safe complication data source, so if a watch face uses this as a default it will be able to receive data from it even before the RECEIVE_COMPLICATION_DATA permission has been granted.

This complication data source supports only `https://developer.android.com/reference/androidx/wear/watchface/complications/data/ComplicationType#SHORT_TEXT`.

### DATA_SOURCE_UNREAD_NOTIFICATION_COUNT

```
public static final int DATA_SOURCE_UNREAD_NOTIFICATION_COUNT = 7
```

Id for the 'unread notification count' complication data source.

This is a safe complication data source, so if a watch face uses this as a default it will be able to receive data from it even before the RECEIVE_COMPLICATION_DATA permission has been granted.

This complication data source supports the following types: `https://developer.android.com/reference/androidx/wear/watchface/complications/data/ComplicationType#MONOCHROMATIC_IMAGE`, `https://developer.android.com/reference/androidx/wear/watchface/complications/data/ComplicationType#SHORT_TEXT`.

### DATA_SOURCE_WATCH_BATTERY

```
public static final int DATA_SOURCE_WATCH_BATTERY = 1
```

Id for the 'watch battery' complication data source.

This is a safe complication data source, so if a watch face uses this as a default it will be able to receive data from it even before the RECEIVE_COMPLICATION_DATA permission has been granted.

This complication data source supports the following types: `https://developer.android.com/reference/androidx/wear/watchface/complications/data/ComplicationType#MONOCHROMATIC_IMAGE`, `https://developer.android.com/reference/androidx/wear/watchface/complications/data/ComplicationType#SHORT_TEXT`, `https://developer.android.com/reference/androidx/wear/watchface/complications/data/ComplicationType#LONG_TEXT`, `https://developer.android.com/reference/androidx/wear/watchface/complications/data/ComplicationType#RANGED_VALUE`.

### DATA_SOURCE_WORLD_CLOCK

```
public static final int DATA_SOURCE_WORLD_CLOCK = 5
```

Id for the 'world clock' complication data source.

This is a safe complication data source, so if a watch face uses this as a default it will be able to receive data from it even before the RECEIVE_COMPLICATION_DATA permission has been granted.

This complication data source supports only `https://developer.android.com/reference/androidx/wear/watchface/complications/data/ComplicationType#SHORT_TEXT`.

### NO_DATA_SOURCE

```
public static final int NO_DATA_SOURCE
```

Specifies that no complication data source should be used.