# WallpaperDescription.Builder

Added in[API level 36](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  
Summary:[Ctors](https://developer.android.com/reference/android/app/wallpaper/WallpaperDescription.Builder#pubctors)\|[Methods](https://developer.android.com/reference/android/app/wallpaper/WallpaperDescription.Builder#pubmethods)\|[Inherited Methods](https://developer.android.com/reference/android/app/wallpaper/WallpaperDescription.Builder#inhmethods)  

# WallpaperDescription.Builder

*** ** * ** ***

[Kotlin](https://developer.android.com/reference/kotlin/android/app/wallpaper/WallpaperDescription.Builder "View this page in Kotlin")\|Java

`
public
static
final

class
WallpaperDescription.Builder
`  
`

extends `[Object](https://developer.android.com/reference/java/lang/Object)`


``


`

|---|----------------------------------------------------|
| [java.lang.Object](https://developer.android.com/reference/java/lang/Object) ||
| ↳ | android.app.wallpaper.WallpaperDescription.Builder |

<br />

*** ** * ** ***

Builder for the immutable[WallpaperDescription](https://developer.android.com/reference/android/app/wallpaper/WallpaperDescription)class

## Summary

|                                                                                                                ### Public constructors                                                                                                                ||
|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---|
| ` `[Builder](https://developer.android.com/reference/android/app/wallpaper/WallpaperDescription.Builder#Builder())`() ` Creates a new, empty[Builder](https://developer.android.com/reference/android/app/wallpaper/WallpaperDescription.Builder). |

|                                                                                                                                                                                                                                                ### Public methods                                                                                                                                                                                                                                                ||
|-------------------------------------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| ` `[WallpaperDescription](https://developer.android.com/reference/android/app/wallpaper/WallpaperDescription)                 | ` `[build](https://developer.android.com/reference/android/app/wallpaper/WallpaperDescription.Builder#build())`() ` Creates and returns the[WallpaperDescription](https://developer.android.com/reference/android/app/wallpaper/WallpaperDescription)represented by this builder.                                                                                                 |
| ` `[WallpaperDescription.Builder](https://developer.android.com/reference/android/app/wallpaper/WallpaperDescription.Builder) | ` `[setContent](https://developer.android.com/reference/android/app/wallpaper/WallpaperDescription.Builder#setContent(android.os.PersistableBundle))`(`[PersistableBundle](https://developer.android.com/reference/android/os/PersistableBundle)` content) ` Set the additional content required to render this wallpaper.                                                        |
| ` `[WallpaperDescription.Builder](https://developer.android.com/reference/android/app/wallpaper/WallpaperDescription.Builder) | ` `[setContextDescription](https://developer.android.com/reference/android/app/wallpaper/WallpaperDescription.Builder#setContextDescription(java.lang.CharSequence))`(`[CharSequence](https://developer.android.com/reference/java/lang/CharSequence)` contextDescription) ` Set the link text for the action associated with this wallpaper.                                     |
| ` `[WallpaperDescription.Builder](https://developer.android.com/reference/android/app/wallpaper/WallpaperDescription.Builder) | ` `[setContextUri](https://developer.android.com/reference/android/app/wallpaper/WallpaperDescription.Builder#setContextUri(android.net.Uri))`(`[Uri](https://developer.android.com/reference/android/net/Uri)` contextUri) ` Set the Uri for the action associated with this wallpaper, to be shown as a link with the wallpaper information.                                    |
| ` `[WallpaperDescription.Builder](https://developer.android.com/reference/android/app/wallpaper/WallpaperDescription.Builder) | ` `[setDescription](https://developer.android.com/reference/android/app/wallpaper/WallpaperDescription.Builder#setDescription(java.util.List<java.lang.CharSequence>))`(`[List](https://developer.android.com/reference/java/util/List)`<`[CharSequence](https://developer.android.com/reference/java/lang/CharSequence)`> description) ` Set the description for this wallpaper. |
| ` `[WallpaperDescription.Builder](https://developer.android.com/reference/android/app/wallpaper/WallpaperDescription.Builder) | ` `[setId](https://developer.android.com/reference/android/app/wallpaper/WallpaperDescription.Builder#setId(java.lang.String))`(`[String](https://developer.android.com/reference/java/lang/String)` id) ` Set the id for this wallpaper.                                                                                                                                         |
| ` `[WallpaperDescription.Builder](https://developer.android.com/reference/android/app/wallpaper/WallpaperDescription.Builder) | ` `[setThumbnail](https://developer.android.com/reference/android/app/wallpaper/WallpaperDescription.Builder#setThumbnail(android.net.Uri))`(`[Uri](https://developer.android.com/reference/android/net/Uri)` thumbnail) ` Set the thumbnail Uri for this wallpaper.                                                                                                              |
| ` `[WallpaperDescription.Builder](https://developer.android.com/reference/android/app/wallpaper/WallpaperDescription.Builder) | ` `[setTitle](https://developer.android.com/reference/android/app/wallpaper/WallpaperDescription.Builder#setTitle(java.lang.CharSequence))`(`[CharSequence](https://developer.android.com/reference/java/lang/CharSequence)` title) ` Set the title for this wallpaper.                                                                                                           |

| ### Inherited methods |
|-----------------------|---|
| From class` `[java.lang.Object](https://developer.android.com/reference/java/lang/Object)` ` |--------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | ` `[Object](https://developer.android.com/reference/java/lang/Object)          | ` `[clone](https://developer.android.com/reference/java/lang/Object#clone())`() ` Creates and returns a copy of this object.                                                                                                                                                      | | ` boolean`                                                                     | ` `[equals](https://developer.android.com/reference/java/lang/Object#equals(java.lang.Object))`(`[Object](https://developer.android.com/reference/java/lang/Object)` obj) ` Indicates whether some other object is "equal to" this one.                                           | | ` void`                                                                        | ` `[finalize](https://developer.android.com/reference/java/lang/Object#finalize())`() ` Called by the garbage collector on an object when garbage collection determines that there are no more references to the object.                                                          | | ` final `[Class](https://developer.android.com/reference/java/lang/Class)`<?>` | ` `[getClass](https://developer.android.com/reference/java/lang/Object#getClass())`() ` Returns the runtime class of this`Object`.                                                                                                                                                | | ` int`                                                                         | ` `[hashCode](https://developer.android.com/reference/java/lang/Object#hashCode())`() ` Returns a hash code value for the object.                                                                                                                                                 | | ` final void`                                                                  | ` `[notify](https://developer.android.com/reference/java/lang/Object#notify())`() ` Wakes up a single thread that is waiting on this object's monitor.                                                                                                                            | | ` final void`                                                                  | ` `[notifyAll](https://developer.android.com/reference/java/lang/Object#notifyAll())`() ` Wakes up all threads that are waiting on this object's monitor.                                                                                                                         | | ` `[String](https://developer.android.com/reference/java/lang/String)          | ` `[toString](https://developer.android.com/reference/java/lang/Object#toString())`() ` Returns a string representation of the object.                                                                                                                                            | | ` final void`                                                                  | ` `[wait](https://developer.android.com/reference/java/lang/Object#wait(long,%20int))`(long timeoutMillis, int nanos) ` Causes the current thread to wait until it is awakened, typically by being*notified* or*interrupted*, or until a certain amount of real time has elapsed. | | ` final void`                                                                  | ` `[wait](https://developer.android.com/reference/java/lang/Object#wait(long))`(long timeoutMillis) ` Causes the current thread to wait until it is awakened, typically by being*notified* or*interrupted*, or until a certain amount of real time has elapsed.                   | | ` final void`                                                                  | ` `[wait](https://developer.android.com/reference/java/lang/Object#wait())`() ` Causes the current thread to wait until it is awakened, typically by being*notified* or*interrupted*.                                                                                             | ||

## Public constructors

### Builder

Added in[API level 36](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  

```
public Builder ()
```

Creates a new, empty[Builder](https://developer.android.com/reference/android/app/wallpaper/WallpaperDescription.Builder).

<br />

## Public methods

### build

Added in[API level 36](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  

```
public WallpaperDescription build ()
```

Creates and returns the[WallpaperDescription](https://developer.android.com/reference/android/app/wallpaper/WallpaperDescription)represented by this builder.

<br />

|                                                      Returns                                                       ||
|------------------------------------------------------------------------------------------------------------|--------|
| [WallpaperDescription](https://developer.android.com/reference/android/app/wallpaper/WallpaperDescription) | <br /> |

### setContent

Added in[API level 36](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  

```
public WallpaperDescription.Builder setContent (PersistableBundle content)
```

Set the additional content required to render this wallpaper.

When setting additional content (asset id, etc.), best practice is to set an ID as well. This allows WallpaperManager and other code to distinguish between different wallpapers handled by this component.

<br />

<br />

|                                       Parameters                                       ||
|-----------|-----------------------------------------------------------------------------|
| `content` | `PersistableBundle`: additional content, or an empty bundle for none <br /> |

|                                                              Returns                                                               ||
|----------------------------------------------------------------------------------------------------------------------------|--------|
| [WallpaperDescription.Builder](https://developer.android.com/reference/android/app/wallpaper/WallpaperDescription.Builder) | <br /> |

### setContextDescription

Added in[API level 36](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  

```
public WallpaperDescription.Builder setContextDescription (CharSequence contextDescription)
```

Set the link text for the action associated with this wallpaper.

<br />

|                                      Parameters                                      ||
|----------------------|----------------------------------------------------------------|
| `contextDescription` | `CharSequence`: the link text, or`null`for default text <br /> |

|                                                              Returns                                                               ||
|----------------------------------------------------------------------------------------------------------------------------|--------|
| [WallpaperDescription.Builder](https://developer.android.com/reference/android/app/wallpaper/WallpaperDescription.Builder) | <br /> |

### setContextUri

Added in[API level 36](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  

```
public WallpaperDescription.Builder setContextUri (Uri contextUri)
```

Set the Uri for the action associated with this wallpaper, to be shown as a link with the wallpaper information.

<br />

|                            Parameters                             ||
|--------------|-----------------------------------------------------|
| `contextUri` | `Uri`: the action Uri, or`null`for no action <br /> |

|                                                              Returns                                                               ||
|----------------------------------------------------------------------------------------------------------------------------|--------|
| [WallpaperDescription.Builder](https://developer.android.com/reference/android/app/wallpaper/WallpaperDescription.Builder) | <br /> |

### setDescription

Added in[API level 36](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  

```
public WallpaperDescription.Builder setDescription (List<CharSequence> description)
```

Set the description for this wallpaper. Each array element should be shown on a different line.

<br />

|                                Parameters                                ||
|---------------|-----------------------------------------------------------|
| `description` | `List`: the description, or an empty list for none <br /> |

|                                                              Returns                                                               ||
|----------------------------------------------------------------------------------------------------------------------------|--------|
| [WallpaperDescription.Builder](https://developer.android.com/reference/android/app/wallpaper/WallpaperDescription.Builder) | <br /> |

### setId

Added in[API level 36](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  

```
public WallpaperDescription.Builder setId (String id)
```

Set the id for this wallpaper.

IDs are used to distinguish among different instances of wallpapers rendered by the same component, and should be unique among all wallpapers for that component.

<br />

<br />

|                   Parameters                    ||
|------|-------------------------------------------|
| `id` | `String`: the id, or`null`for none <br /> |

|                                                              Returns                                                               ||
|----------------------------------------------------------------------------------------------------------------------------|--------|
| [WallpaperDescription.Builder](https://developer.android.com/reference/android/app/wallpaper/WallpaperDescription.Builder) | <br /> |

### setThumbnail

Added in[API level 36](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  

```
public WallpaperDescription.Builder setThumbnail (Uri thumbnail)
```

Set the thumbnail Uri for this wallpaper.

<br />

|                           Parameters                           ||
|-------------|---------------------------------------------------|
| `thumbnail` | `Uri`: the thumbnail Uri, or`null`for none <br /> |

|                                                              Returns                                                               ||
|----------------------------------------------------------------------------------------------------------------------------|--------|
| [WallpaperDescription.Builder](https://developer.android.com/reference/android/app/wallpaper/WallpaperDescription.Builder) | <br /> |

### setTitle

Added in[API level 36](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  

```
public WallpaperDescription.Builder setTitle (CharSequence title)
```

Set the title for this wallpaper.

<br />

|                         Parameters                          ||
|---------|----------------------------------------------------|
| `title` | `CharSequence`: the title, or`null`for none <br /> |

|                                                              Returns                                                               ||
|----------------------------------------------------------------------------------------------------------------------------|--------|
| [WallpaperDescription.Builder](https://developer.android.com/reference/android/app/wallpaper/WallpaperDescription.Builder) | <br /> |