public final class SystemDataSources


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

Summary

Constants

static final int

Id for the 'app shortcut' complication data source.

static final int

Id for the 'date' complication data source.

static final int

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

static final int

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

static final int

Id for the 'favorite contact' complication data source.

static final int

Id for the 'heart rate' complication data source.

static final int

Id for the 'next event' complication data source.

static final int

Id for the 'step count' complication data source.

static final int

Id for the 'sunrise sunset' complication data source.

static final int

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

static final int

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

static final int

Id for the 'watch battery' complication data source.

static final int

Id for the 'world clock' complication data source.

static final int

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: ComplicationType.SMALL_IMAGE, 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 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 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 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 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 ComplicationType.SHORT_TEXT although it's a good idea for the slot to support 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: ComplicationType.SHORT_TEXT, 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 ComplicationType.SHORT_TEXT and ComplicationType.GOAL_PROGRESS, although it's a good idea for the slot to support 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 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 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: ComplicationType.MONOCHROMATIC_IMAGE, 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: ComplicationType.MONOCHROMATIC_IMAGE, ComplicationType.SHORT_TEXT, ComplicationType.LONG_TEXT, 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 ComplicationType.SHORT_TEXT.

NO_DATA_SOURCE

public static final int NO_DATA_SOURCE

Specifies that no complication data source should be used.