NoPermissionComplicationData


public final class NoPermissionComplicationData extends ComplicationData


Type sent by the system when the watch face does not have permission to receive complication data.

The text, title, and icon may be displayed by watch faces, but this is not required.

It is recommended that, where possible, tapping on the complication when in this state should trigger a permission request. Note this is done by androidx.wear.watchface.ComplicationSlotsManager for androidx watch faces.

Summary

Nested types

Builder for NoPermissionComplicationData.

Public fields

static final @NonNull ComplicationType

The ComplicationType corresponding to objects of this type.

Public methods

final MonochromaticImage

A simple MonochromaticImage image that can be tinted by the watch face.

@NonNull Instant

Returns the next Instant after afterInstant at which any field of the complication may change.

final SmallImage

A SmallImage that is expected to cover a small fraction of a watch face occupied by a single complication

final ComplicationText

The body ComplicationText of the complication.

final ComplicationText

The optional title ComplicationText.

@NonNull String

Inherited methods

From androidx.wear.watchface.complications.data.ComplicationData
boolean
equals(Object other)
final ComponentName

The ComponentName of the androidx.wear.watchface.complications.datasource.ComplicationDataSourceService that provided the ComplicationData.

final int

The display policy for this complication.

final ComplicationData

Used in case any dynamic value has been invalidated.

final int

The persistence policy for this complication.

final PendingIntent

The PendingIntent to send when the complication is tapped on.

final boolean

tapAction which is a PendingIntent unfortunately can't be serialized.

final @NonNull ComplicationType

The ComplicationType of this complication data.

final @NonNull TimeRange

The TimeRange within which the complication should be displayed.

boolean

Returns true if any of the fields of this ComplicationData are placeholders.

int
final void
setTapActionLostDueToSerialization(
    boolean tapActionLostDueToSerialization
)

tapAction which is a PendingIntent unfortunately can't be serialized.

Public fields

TYPE

public static final @NonNull ComplicationType TYPE

The ComplicationType corresponding to objects of this type.

Public methods

getMonochromaticImage

Added in 1.0.0
public final MonochromaticImage getMonochromaticImage()

A simple MonochromaticImage image that can be tinted by the watch face.

getNextChangeInstant

public @NonNull Instant getNextChangeInstant(@NonNull Instant afterInstant)

Returns the next Instant after afterInstant at which any field of the complication may change. If there's no scheduled changes then Instant.MAX will be returned.

See ComplicationText.getNextChangeTime

Parameters
@NonNull Instant afterInstant

The reference Instant, after which changes will be reported.

getSmallImage

Added in 1.2.0
public final SmallImage getSmallImage()

A SmallImage that is expected to cover a small fraction of a watch face occupied by a single complication

getText

Added in 1.0.0
public final ComplicationText getText()

The body ComplicationText of the complication. The length of the text, including any time-dependent values at any valid time, is expected to not exceed seven characters. When using this text, the watch face should be able to display any string of up to seven characters (reducing the text size appropriately if the string is very wide). Although not expected, it is possible that strings of more than seven characters might be seen, in which case they may be truncated.

getTitle

Added in 1.0.0
public final ComplicationText getTitle()

The optional title ComplicationText. The length of the text, including any time-dependent values at any valid time, is expected to not exceed seven characters. When using this text, the watch face should be able to display any string of up to seven characters (reducing the text size appropriately if the string is very wide). Although not expected, it is possible that strings of more than seven characters might be seen, in which case they may be truncated.

toString

public @NonNull String toString()