ComplicationDataSourceInfo


class ComplicationDataSourceInfo


Holder of details of a complication data source, for use by watch faces (for example, to show the current complication data source in settings). A ComplicationDataSourceInfoRetriever can be used to obtain references of this class for each of a watch face's complications.

Summary

Public constructors

ComplicationDataSourceInfo(
    appName: String,
    name: String,
    icon: Icon,
    type: ComplicationType,
    componentName: ComponentName?
)

Public functions

open operator Boolean
equals(other: Any?)
open Int
open String

Public properties

String

The name of the application containing the complication data source.

ComponentName?

The complication data source's {@link ComponentName}.

ComplicationData

Lazily constructed fallback preview ComplicationData based on this ComplicationDataSourceInfo.

Icon

The icon for the complication data source.

String

The name of the complication data source.

ComplicationType

The type of the complication provided by the data source.

Public constructors

ComplicationDataSourceInfo

Added in 1.0.0
ComplicationDataSourceInfo(
    appName: String,
    name: String,
    icon: Icon,
    type: ComplicationType,
    componentName: ComponentName?
)

Public functions

equals

open operator fun equals(other: Any?): Boolean

hashCode

open fun hashCode(): Int

toString

open fun toString(): String

Public properties

appName

Added in 1.0.0
val appNameString

The name of the application containing the complication data source.

componentName

Added in 1.0.0
val componentNameComponentName?

The complication data source's {@link ComponentName}.

This field is populated only on Android R and above and it is null otherwise.

fallbackPreviewData

Added in 1.0.0
val fallbackPreviewDataComplicationData

Lazily constructed fallback preview ComplicationData based on this ComplicationDataSourceInfo. This is useful when ComplicationDataSourceInfoRetriever.retrievePreviewComplicationData returns null (e.g. on a pre-android R device).

icon

Added in 1.0.0
val iconIcon

The icon for the complication data source.

name

Added in 1.0.0
val nameString

The name of the complication data source.

type

Added in 1.0.0
val typeComplicationType

The type of the complication provided by the data source.