Android 12 Developer Preview is here! Try it out, and give us your feedback!

NoPermissionComplicationData

class NoPermissionComplicationData : ComplicationData
kotlin.Any
   ↳ androidx.wear.complications.data.ComplicationData
   ↳ androidx.wear.complications.data.NoPermissionComplicationData

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. A ComplicationHelperActivity may be used to make this request and update all complications if the permission is granted.

Summary

Nested classes

Builder for NoPermissionComplicationData.

Public methods
WireComplicationData

Boolean
isActiveAt(dateTimeMillis: Long)

Returns true if the complication is active and should be displayed at the given time.

Properties
MonochromaticImage?

ComplicationText?

ComplicationText?

Companion properties
ComplicationType

The ComplicationType corresponding to objects of this type.

Inherited properties

Public methods

asWireComplicationData

fun asWireComplicationData(): WireComplicationData

isActiveAt

fun isActiveAt(dateTimeMillis: Long): Boolean

Returns true if the complication is active and should be displayed at the given time. If this returns false, the complication should not be displayed.

This must be checked for any time for which the complication will be displayed.

Properties

monochromaticImage

val monochromaticImage: MonochromaticImage?

text

val text: ComplicationText?

title

val title: ComplicationText?

Companion properties

TYPE

val TYPE: ComplicationType

The ComplicationType corresponding to objects of this type.