Google se compromete a impulsar la igualdad racial para las comunidades afrodescendientes. Obtén información al respecto.

WatchState

class WatchState
kotlin.Any
   ↳ androidx.wear.watchface.WatchState

Describes the current state of the wearable including some hardware details such as whether or not it supports burn in prevention and low-bit ambient.

Summary

Public constructors
<init>(interruptionFilter: ObservableWatchData<Int>, isAmbient: ObservableWatchData<Boolean>, isBatteryLowAndNotCharging: ObservableWatchData<Boolean>, isVisible: ObservableWatchData<Boolean>, hasLowBitAmbient: Boolean, hasBurnInProtection: Boolean, analogPreviewReferenceTimeMillis: Long, digitalPreviewReferenceTimeMillis: Long, isHeadless: Boolean)

Describes the current state of the wearable including some hardware details such as whether or not it supports burn in prevention and low-bit ambient.

Properties
Long

UTC reference time for previews of analog watch faces in milliseconds since the epoch.

Long

UTC reference time for previews of digital watch faces in milliseconds since the epoch.

Boolean

Whether or not the watch hardware supports burn in protection.

Boolean

Whether or not the watch hardware supports low bit ambient support.

ObservableWatchData<Int>

The current user interruption settings.

ObservableWatchData<Boolean>

Whether or not the watch is in ambient mode.

ObservableWatchData<Boolean>

Whether or not we should conserve power due to a low battery which isn't charging.

Boolean

Whether or not this is a headless watchface.

ObservableWatchData<Boolean>

Whether or not the watch face is visible.

Public constructors

<init>

WatchState(
    interruptionFilter: ObservableWatchData<Int>,
    isAmbient: ObservableWatchData<Boolean>,
    isBatteryLowAndNotCharging: ObservableWatchData<Boolean>,
    isVisible: ObservableWatchData<Boolean>,
    hasLowBitAmbient: Boolean,
    hasBurnInProtection: Boolean,
    analogPreviewReferenceTimeMillis: Long,
    digitalPreviewReferenceTimeMillis: Long,
    isHeadless: Boolean)

Describes the current state of the wearable including some hardware details such as whether or not it supports burn in prevention and low-bit ambient.

Properties

analogPreviewReferenceTimeMillis

val analogPreviewReferenceTimeMillis: Long

UTC reference time for previews of analog watch faces in milliseconds since the epoch.

digitalPreviewReferenceTimeMillis

val digitalPreviewReferenceTimeMillis: Long

UTC reference time for previews of digital watch faces in milliseconds since the epoch.

hasBurnInProtection

val hasBurnInProtection: Boolean

Whether or not the watch hardware supports burn in protection.

hasLowBitAmbient

val hasLowBitAmbient: Boolean

Whether or not the watch hardware supports low bit ambient support.

interruptionFilter

val interruptionFilter: ObservableWatchData<Int>

The current user interruption settings. See NotificationManager. Based on the value the watch face should adjust the amount of information it displays. For example, if it displays the number of pending emails, it should hide it if interruptionFilter is equal to NotificationManager.INTERRUPTION_FILTER_NONE. interruptionFilter can be NotificationManager.INTERRUPTION_FILTER_NONE, NotificationManager.INTERRUPTION_FILTER_PRIORITY, NotificationManager.INTERRUPTION_FILTER_ALL, NotificationManager.INTERRUPTION_FILTER_ALARMS, or NotificationManager.INTERRUPTION_FILTER_UNKNOWN.

isAmbient

val isAmbient: ObservableWatchData<Boolean>

Whether or not the watch is in ambient mode. The watch face should switch to a simplified low intensity display when in ambient mode. E.g. if the watch face displays seconds, it should hide them in ambient mode.

isBatteryLowAndNotCharging

val isBatteryLowAndNotCharging: ObservableWatchData<Boolean>

Whether or not we should conserve power due to a low battery which isn't charging. Only valid if android.support.wearable.watchface.WatchFaceStyle.hideNotificationIndicator is true.

isHeadless

val isHeadless: Boolean

Whether or not this is a headless watchface.

isVisible

val isVisible: ObservableWatchData<Boolean>

Whether or not the watch face is visible.