RequestBuilders.TileRequest

public final class RequestBuilders.TileRequest


Parameters passed to a androidx.wear.tiles.TileBuilders.Tile Service when the renderer is requesting a new version of the tile.

1.0

Summary

Nested types

Builder for TileRequest

Public methods

@NonNull StateBuilders.State

Gets the androidx.wear.protolayout.StateBuilders.State that should be used when building the tile.

@NonNull DeviceParametersBuilders.DeviceParameters

Gets the androidx.wear.protolayout.DeviceParametersBuilders.DeviceParameters object describing the device requesting the tile update.

@Nullable DeviceParametersBuilders.DeviceParameters

This method is deprecated.

Use getDeviceConfiguration instead.

@Nullable StateBuilders.State

This method is deprecated.

Use getCurrentState instead.

int

Gets the instance ID of the tile being requested, allocated when the tile instance is added to the carousel.

@NonNull String

Public methods

getCurrentState

Added in 1.2.0
public @NonNull StateBuilders.State getCurrentState()

Gets the androidx.wear.protolayout.StateBuilders.State that should be used when building the tile.

1.0

getDeviceConfiguration

Added in 1.2.0
public @NonNull DeviceParametersBuilders.DeviceParameters getDeviceConfiguration()

Gets the androidx.wear.protolayout.DeviceParametersBuilders.DeviceParameters object describing the device requesting the tile update. If not set, a default empty instance is used.

1.0

getDeviceParameters

Added in 1.0.0
Deprecated in 1.2.0
public @Nullable DeviceParametersBuilders.DeviceParameters getDeviceParameters()

Gets the androidx.wear.tiles.DeviceParametersBuilders.DeviceParameters object describing the device requesting the tile update.

1.0

getState

Added in 1.0.0
Deprecated in 1.2.0
public @Nullable StateBuilders.State getState()

Gets the androidx.wear.tiles.StateBuilders.State that should be used when building the tile.

1.0

getTileId

Added in 1.2.0
public int getTileId()

Gets the instance ID of the tile being requested, allocated when the tile instance is added to the carousel. This ID will remain the same for this tile instance as long it is not removed from the carousel.

1.0

toString

public @NonNull String toString()