RequestBuilders.ResourcesRequest

public final class RequestBuilders.ResourcesRequest


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

Summary

Public methods

static @NonNull RequestBuilders.ResourcesRequest.Builder

Returns a new Builder.

@Nullable DeviceParametersBuilders.DeviceParameters

Gets parameters describing the device requesting the resources.

@NonNull List<@NonNull String>

Gets requested resource IDs.

@NonNull String

Gets the version of the resources being fetched.

Public methods

builder

@NonNull
public static RequestBuilders.ResourcesRequest.Builder builder()

Returns a new Builder.

getDeviceParameters

@Nullable
@NonNull
public DeviceParametersBuilders.DeviceParameters getDeviceParameters()

Gets parameters describing the device requesting the resources. Intended for testing purposes only.

getResourceIds

@NonNull
public List<@NonNull StringgetResourceIds()

Gets requested resource IDs. This specifies which tile resources should be returned in the androidx.wear.tiles.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.tiles.ResourceBuilders.Resources.idToImage), not Android resource names or similar.

getVersion

@NonNull
public 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.