TileBuilders.Tile.Builder

public final class TileBuilders.Tile.Builder


Builder for Tile

Summary

Public methods

@NonNull TileBuilders.Tile

Builds an instance from accumulated values.

@NonNull TileBuilders.Tile.Builder
setFreshnessIntervalMillis(@NonNull long freshnessIntervalMillis)

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

@NonNull TileBuilders.Tile.Builder
setResourcesVersion(@NonNull String resourcesVersion)

Sets the resource version required for these tiles.

@NonNull TileBuilders.Tile.Builder

Sets the tiles to show in the carousel, along with their validity periods.

@NonNull TileBuilders.Tile.Builder

Sets the tiles to show in the carousel, along with their validity periods.

Public methods

build

@NonNull
public TileBuilders.Tile build()

Builds an instance from accumulated values.

setFreshnessIntervalMillis

@NonNull
public TileBuilders.Tile.Builder setFreshnessIntervalMillis(@NonNull long freshnessIntervalMillis)

Sets 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 TileProviderService#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.

setResourcesVersion

@NonNull
public TileBuilders.Tile.Builder setResourcesVersion(@NonNull String resourcesVersion)

Sets 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 if the system does not have a copy of the specified resource version.

setTimeline

@NonNull
public TileBuilders.Tile.Builder setTimeline(@NonNull TimelineBuilders.Timeline timeline)

Sets the tiles to show in the carousel, along with their validity periods.

setTimeline

@NonNull
public TileBuilders.Tile.Builder setTimeline(@NonNull TimelineBuilders.Timeline.Builder timelineBuilder)

Sets the tiles to show in the carousel, along with their validity periods.