public final class

TileBuilders.Tile

extends java.lang.Object

 java.lang.Object

↳androidx.wear.tiles.TileBuilders.Tile

Overview

A holder for a tile. This specifies the resources to use for this delivery of the tile, and the timeline for the tile.

Summary

Methods
public static TileBuilders.TilefromProto(TileProto.Tile proto)

Creates a new wrapper instance from the proto.

public longgetFreshnessIntervalMillis()

Gets how many milliseconds of elapsed time (**not** wall clock time) this tile can be considered to be "fresh".

public java.lang.StringgetResourcesVersion()

Gets the resource version required for these tiles.

public StateBuilders.StategetState()

Gets StateBuilders.State for this tile.

public TimelineBuilders.TimelinegetTileTimeline()

Gets the TimelineBuilders.Timeline containing the layouts for the tiles to show in the carousel, along with their validity periods.

public TimelineBuilders.TimelinegetTimeline()

Gets the TimelineBuilders.Timeline containing the layouts for the tiles to show in the carousel, along with their validity periods.

public TileProto.TiletoProto()

Returns the internal proto instance.

public java.lang.StringtoString()

from java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Methods

public java.lang.String getResourcesVersion()

Gets the resource version required for these tiles. This can be any developer-defined string; it is only used to cache resources, and is passed in RequestBuilders.ResourcesRequest if the system does not have a copy of the specified resource version.

public TimelineBuilders.Timeline getTileTimeline()

Gets the TimelineBuilders.Timeline containing the layouts for the tiles to show in the carousel, along with their validity periods.

public long getFreshnessIntervalMillis()

Gets how many milliseconds of elapsed time (**not** wall clock time) this tile can be considered to be "fresh". The platform will attempt to refresh your tile at some point in the future after this interval has lapsed. A value of 0 here signifies that auto-refreshes should not be used (i.e. you will manually request updates via TileService#getRequester).

This mechanism should not be used to update your tile more frequently than once a minute, and the system may throttle your updates if you request updates faster than this interval. This interval is also inexact; the system will generally update your tile if it is on-screen, or about to be on-screen, although this is not guaranteed due to system-level optimizations.

public StateBuilders.State getState()

Gets StateBuilders.State for this tile.

public TimelineBuilders.Timeline getTimeline()

Deprecated: Use TileBuilders.Tile.getTileTimeline() instead.

Gets the TimelineBuilders.Timeline containing the layouts for the tiles to show in the carousel, along with their validity periods.

public static TileBuilders.Tile fromProto(TileProto.Tile proto)

Creates a new wrapper instance from the proto.

public TileProto.Tile toProto()

Returns the internal proto instance.

public java.lang.String toString()