PlatformEventSources
public static class PlatformEventSources
Dynamic types for platform events
Summary
Nested types |
|---|
public final class PlatformEventSources.DynamicLayoutUpdateStatus implements DynamicBuilders.DynamicInt32Dynamic layout update status value. |
public static class PlatformEventSources.KeysData sources keys for platform event. |
Constants |
|
|---|---|
static final int |
There are no pending layout updates. |
static final int |
A new layout has been requested, but there was an error. |
static final int |
A new layout has been requested. |
Public fields |
|
|---|---|
static @NonNull PlatformEventSources |
Public methods |
|
|---|---|
static final @NonNull DynamicBuilders.DynamicBool |
@RequiresSchemaVersion(major = 1, minor = 600)Returns a |
static final @NonNull DynamicBuilders.DynamicBool |
@RequiresSchemaVersion(major = 1, minor = 500)Returns a |
static final @NonNull PlatformEventSources.DynamicLayoutUpdateStatus |
@RequiresSchemaVersion(major = 1, minor = 600)Returns a |
Constants
LAYOUT_UPDATE_IDLE
public static final int LAYOUT_UPDATE_IDLE = 0
There are no pending layout updates.
LAYOUT_UPDATE_IDLE_ERROR
public static final int LAYOUT_UPDATE_IDLE_ERROR = 2
A new layout has been requested, but there was an error. The system will retry the update.
LAYOUT_UPDATE_WAITING
public static final int LAYOUT_UPDATE_WAITING = 1
A new layout has been requested.
Public fields
Public methods
isInAmbientMode
@RequiresSchemaVersion(major = 1, minor = 600)
public static final @NonNull DynamicBuilders.DynamicBool isInAmbientMode()
Returns a DynamicBool which receives the current ambient mode status from platform.
The ambient status value is true if the device is in ambient mode and false otherwise.
isLayoutVisible
@RequiresSchemaVersion(major = 1, minor = 500)
public static final @NonNull DynamicBuilders.DynamicBool isLayoutVisible()
Returns a DynamicBool which receives the current visibility status from platform.
The visibility status value is true when layout is visible, and false when invisible.
layoutUpdateStatus
@RequiresSchemaVersion(major = 1, minor = 600)
public static final @NonNull PlatformEventSources.DynamicLayoutUpdateStatus layoutUpdateStatus()
Returns a DynamicLayoutUpdateStatus representing the current status of the layout update.
The platform requests a new layout when explicitly requested by the tile provider, or when the current layout becomes invalidated.
The layout update status can be one of the following:
-
LAYOUT_UPDATE_WAITING: The layout update is pending, starting from when a new layout is requested until it is successfully received and inflated. -
LAYOUT_UPDATE_IDLE_ERROR: The latest layout request failed. -
LAYOUT_UPDATE_IDLE: All other times, indicating no pending or failed layout update.