RequestBuilders.ResourcesRequest.Builder

public final class RequestBuilders.ResourcesRequest.Builder


Builder for ResourcesRequest

Summary

Public methods

@NonNull RequestBuilders.ResourcesRequest.Builder

Adds one item to requested resource IDs.

@NonNull RequestBuilders.ResourcesRequest

Builds an instance from accumulated values.

@NonNull RequestBuilders.ResourcesRequest.Builder

Sets parameters describing the device requesting the resources.

@NonNull RequestBuilders.ResourcesRequest.Builder

Sets parameters describing the device requesting the resources.

@NonNull RequestBuilders.ResourcesRequest.Builder

Sets the version of the resources being fetched.

Public methods

addResourceId

@NonNull
public RequestBuilders.ResourcesRequest.Builder addResourceId(@NonNull String resourceId)

Adds one item to 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.

build

@NonNull
public RequestBuilders.ResourcesRequest build()

Builds an instance from accumulated values.

setDeviceParameters

@NonNull
public RequestBuilders.ResourcesRequest.Builder setDeviceParameters(
    @NonNull DeviceParametersBuilders.DeviceParameters deviceParameters
)

Sets parameters describing the device requesting the resources.

setDeviceParameters

@NonNull
public RequestBuilders.ResourcesRequest.Builder setDeviceParameters(
    @NonNull DeviceParametersBuilders.DeviceParameters.Builder deviceParametersBuilder
)

Sets parameters describing the device requesting the resources.

setVersion

@NonNull
public RequestBuilders.ResourcesRequest.Builder setVersion(@NonNull String version)

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