RequestBuilders.ResourcesRequest

public final class RequestBuilders.ResourcesRequest


Parameters passed to a androidx.wear.tiles.TileBuilders.Tile Service when the renderer is requesting a specific resource version.

1.0

Summary

Nested types

Builder for ResourcesRequest

Public methods

@NonNull DeviceParametersBuilders.DeviceParameters

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

@Nullable DeviceParametersBuilders.DeviceParameters

This method is deprecated.

Use getDeviceConfiguration instead.

@NonNull List<String>

Gets requested resource IDs.

int

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

@NonNull String

Gets the version of the resources being fetched.

@NonNull String

Public methods

getDeviceConfiguration

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

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

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 resources.

1.0

getResourceIds

Added in 1.0.0
public @NonNull List<StringgetResourceIds()

Gets requested resource IDs. This specifies which tile resources should be returned in the androidx.wear.protolayout.ResourceBuilders.Resources response. If not specified, all resources for the given version must be provided in the response.

Note that resource IDs here correspond to tile resources (i.e. keys that would be used in androidx.wear.protolayout.ResourceBuilders.Resources.idToImage), not Android resource names or similar.

1.0

getTileId

Added in 1.2.0
public int getTileId()

Gets the instance ID of the tile for which resources are 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

getVersion

Added in 1.0.0
public @NonNull String getVersion()

Gets the version of the resources being fetched. This is the same as the requested resource version, passed in androidx.wear.tiles.TileBuilders.Tile.

1.0

toString

public @NonNull String toString()