RequestBuilders.ResourcesRequest
@RequiresSchemaVersion(major = 1, minor = 0)
class RequestBuilders.ResourcesRequest
Parameters passed to a androidx.wear.tiles.TileBuilders.Tile Service when the renderer is requesting a specific resource version.
Summary
Nested types |
|---|
|
Builder for |
Public functions |
|
|---|---|
DeviceParametersBuilders.DeviceParameters |
Gets the |
DeviceParametersBuilders.DeviceParameters? |
This function is deprecated. Use |
(Mutable)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. |
String |
Gets the version of the resources being fetched. |
String |
toString() |
Public functions
getDeviceConfiguration
fun getDeviceConfiguration(): DeviceParametersBuilders.DeviceParameters
Gets the androidx.wear.protolayout.DeviceParametersBuilders.DeviceParameters object describing the device requesting the resources.
fungetDeviceParameters(): DeviceParametersBuilders.DeviceParameters?
Gets the androidx.wear.tiles.DeviceParametersBuilders.DeviceParameters object describing the device requesting the resources.
getResourceIds
fun getResourceIds(): (Mutable)List<String!>
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.
getTileId
fun getTileId(): Int
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.
getVersion
fun getVersion(): String
Gets the version of the resources being fetched. This is the same as the requested resource version, passed in androidx.wear.tiles.TileBuilders.Tile.