# localResources

Register Android resources or file URIs so paywalls can load local media by resource ID.

> **Info**

Available in Android SDK `2.7.7+`.



Purpose [#purpose]

`localResources` lets you map paywall asset IDs to local Android resources or file URIs. Paywalls can then request those assets with `swlocal://resource-id` instead of downloading them from a remote URL.

Signature [#signature]

```kotlin
var localResources: Map<String, PaywallResource>
```

```java
public Map<String, PaywallResource> getLocalResources()
public void setLocalResources(Map<String, PaywallResource> localResources)
```

Schema [#schema]

<TypeTable
  type="{
  key: {
    type: &#x22;String&#x22;,
    description: &#x22;The resource ID used in the paywall editor or in a `swlocal://resource-id` URL.&#x22;,
    required: true,
  },
  value: {
    type: &#x22;PaywallResource&#x22;,
    description: &#x22;The local Android asset to serve for that resource ID.&#x22;,
    required: true,
  },
}"
/>

PaywallResource variants [#paywallresource-variants]

<TypeTable
  type="{
  &#x22;PaywallResource.FromResources(resId)&#x22;: {
    type: &#x22;Int&#x22;,
    description: &#x22;Use an Android resource ID from `res/drawable`, `res/raw`, or another packaged resource folder.&#x22;,
    required: true,
  },
  &#x22;PaywallResource.FromUri(uri)&#x22;: {
    type: &#x22;Uri&#x22;,
    description: &#x22;Use a local `Uri`, such as a file in app storage or a content provider URL.&#x22;,
    required: true,
  },
}"
/>

Returns / State [#returns--state]

This is a mutable property on [`Superwall.instance`](/docs/android/sdk-reference/Superwall). Set it before presenting paywalls that depend on local assets.

Related [#related]

* [Local Resources guide](/docs/android/guides/local-resources)