# RequestBuilders.ResourcesRequest

Artifact: [androidx.wear.tiles:tiles](https://developer.android.com/jetpack/androidx/releases/wear-tiles) [View Source](https://cs.android.com/search?q=file:androidx/wear/tiles/RequestBuilders.java+class:androidx.wear.tiles.RequestBuilders.ResourcesRequest) Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/wear-tiles#1.0.0)

*** ** * ** ***


```
@RequiresSchemaVersion(major = 1, minor = 0)
public final class RequestBuilders.ResourcesRequest
```

<br />

*** ** * ** ***

Parameters passed to a `https://developer.android.com/reference/androidx/wear/tiles/TileBuilders.Tile` Service when the renderer is requesting a specific resource version.

## Summary

| ### Nested types |
|---|
| `public final class https://developer.android.com/reference/androidx/wear/tiles/RequestBuilders.ResourcesRequest.Builder` Builder for `https://developer.android.com/reference/androidx/wear/tiles/RequestBuilders.ResourcesRequest` |

| ### Public methods |
|---|---|
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/wear/protolayout/DeviceParametersBuilders.DeviceParameters` | `https://developer.android.com/reference/androidx/wear/tiles/RequestBuilders.ResourcesRequest#getDeviceConfiguration()()` Gets the `https://developer.android.com/reference/androidx/wear/protolayout/DeviceParametersBuilders.DeviceParameters` object describing the device requesting the resources. |
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/Nullable.html https://developer.android.com/reference/androidx/wear/tiles/DeviceParametersBuilders.DeviceParameters` | `[getDeviceParameters](https://developer.android.com/reference/androidx/wear/tiles/RequestBuilders.ResourcesRequest#getDeviceParameters())()` **This method is deprecated.** Use `https://developer.android.com/reference/androidx/wear/tiles/RequestBuilders.ResourcesRequest#getDeviceConfiguration()` instead. <br /> |
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/java/util/List.html<https://developer.android.com/reference/java/lang/String.html>` | `https://developer.android.com/reference/androidx/wear/tiles/RequestBuilders.ResourcesRequest#getResourceIds()()` Gets requested resource IDs. |
| `int` | `https://developer.android.com/reference/androidx/wear/tiles/RequestBuilders.ResourcesRequest#getTileId()()` Gets the instance ID of the tile for which resources are being requested, allocated when the tile instance is added to the carousel. |
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/java/lang/String.html` | `https://developer.android.com/reference/androidx/wear/tiles/RequestBuilders.ResourcesRequest#getVersion()()` Gets the version of the resources being fetched. |
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/java/lang/String.html` | `https://developer.android.com/reference/androidx/wear/tiles/RequestBuilders.ResourcesRequest#toString()()` |

## Public methods

### getDeviceConfiguration

Added in [1.2.0](https://developer.android.com/jetpack/androidx/releases/wear-tiles#1.2.0)

```
public @NonNull DeviceParametersBuilders.DeviceParameters getDeviceConfiguration()
```

Gets the `https://developer.android.com/reference/androidx/wear/protolayout/DeviceParametersBuilders.DeviceParameters` object describing the device requesting the resources.

### getDeviceParameters

Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/wear-tiles#1.0.0) Deprecated in [1.2.0](https://developer.android.com/jetpack/androidx/releases/wear-tiles#1.2.0)

```
public @Nullable DeviceParametersBuilders.DeviceParameters [getDeviceParameters](https://developer.android.com/reference/androidx/wear/tiles/RequestBuilders.ResourcesRequest#getDeviceParameters())()
```

> [!CAUTION]
> **This method is deprecated.**   
>
> Use `https://developer.android.com/reference/androidx/wear/tiles/RequestBuilders.ResourcesRequest#getDeviceConfiguration()` instead.

Gets the `https://developer.android.com/reference/androidx/wear/tiles/DeviceParametersBuilders.DeviceParameters` object describing the device requesting the resources.

### getResourceIds

Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/wear-tiles#1.0.0)

```
public @NonNull List<String> getResourceIds()
```

Gets requested resource IDs. This specifies which tile resources should be returned in the `https://developer.android.com/reference/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 `https://developer.android.com/reference/androidx/wear/protolayout/ResourceBuilders.Resources`.idToImage), not Android resource names or similar.

### getTileId

Added in [1.2.0](https://developer.android.com/jetpack/androidx/releases/wear-tiles#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.

### getVersion

Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/wear-tiles#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 `https://developer.android.com/reference/androidx/wear/tiles/TileBuilders.Tile`.

### toString

```
public @NonNull String toString()
```