# androidx.glance.wear.tiles.state

# androidx.glance.wear.tiles.state

## Top-level functions summary

|-------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `suspend T` | `<T : `[Any](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html)`?> `~~[getWearTileState](https://developer.android.com/reference/kotlin/androidx/glance/wear/tiles/state/package-summary#getWearTileState(android.content.Context,androidx.glance.state.GlanceStateDefinition,androidx.glance.GlanceId))~~`(` ` context: `[Context](https://developer.android.com/reference/android/content/Context.html)`,` ` definition: `[GlanceStateDefinition](https://developer.android.com/reference/kotlin/androidx/glance/state/GlanceStateDefinition)`<T>,` ` glanceId: `[GlanceId](https://developer.android.com/reference/kotlin/androidx/glance/GlanceId) `)` **This function is deprecated.**glance-wear-tiles is deprecated and will be removed                                                                                |
| `suspend T` | `<T : `[Any](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html)`?> `~~[updateWearTileState](https://developer.android.com/reference/kotlin/androidx/glance/wear/tiles/state/package-summary#updateWearTileState(android.content.Context,androidx.glance.state.GlanceStateDefinition,androidx.glance.GlanceId,kotlin.coroutines.SuspendFunction1))~~`(` ` context: `[Context](https://developer.android.com/reference/android/content/Context.html)`,` ` definition: `[GlanceStateDefinition](https://developer.android.com/reference/kotlin/androidx/glance/state/GlanceStateDefinition)`<T>,` ` glanceId: `[GlanceId](https://developer.android.com/reference/kotlin/androidx/glance/GlanceId)`,` ` updateState: suspend (T) `->` T` `)` **This function is deprecated.**glance-wear-tiles is deprecated and will be removed |

## Top-level functions

### getWearTileState

Artifact:[androidx.glance:glance-wear-tiles](https://developer.android.com/jetpack/androidx/releases/glance)  
[View Source](https://cs.android.com/search?q=file:androidx/glance/wear/tiles/state/GlanceWearTilesState.kt+function:getWearTileState)  

```
suspend fun <T : Any?> [getWearTileState](https://developer.android.com/reference/kotlin/androidx/glance/wear/tiles/state/package-summary#getWearTileState(android.content.Context,androidx.glance.state.GlanceStateDefinition,androidx.glance.GlanceId))(
    context: Context,
    definition: GlanceStateDefinition<T>,
    glanceId: GlanceId
): T
```
| **This function is deprecated.**   
| glance-wear-tiles is deprecated and will be removed

Retrieve the state of a wear tile.

The state definition must be the one used for that particular wear tile.  

|                                                               Parameters                                                               |
|----------------------------------------------------------------------------------------------------------------------------------------|-----------------------------------------------|
| `context: `[Context](https://developer.android.com/reference/android/content/Context.html)                                             | the context used to create this state         |
| `definition: `[GlanceStateDefinition](https://developer.android.com/reference/kotlin/androidx/glance/state/GlanceStateDefinition)`<T>` | the configuration that defines this state     |
| `glanceId: `[GlanceId](https://developer.android.com/reference/kotlin/androidx/glance/GlanceId)                                        | the glance id of this particular tile service |

### updateWearTileState

Artifact:[androidx.glance:glance-wear-tiles](https://developer.android.com/jetpack/androidx/releases/glance)  
[View Source](https://cs.android.com/search?q=file:androidx/glance/wear/tiles/state/GlanceWearTilesState.kt+function:updateWearTileState)  

```
suspend fun <T : Any?> [updateWearTileState](https://developer.android.com/reference/kotlin/androidx/glance/wear/tiles/state/package-summary#updateWearTileState(android.content.Context,androidx.glance.state.GlanceStateDefinition,androidx.glance.GlanceId,kotlin.coroutines.SuspendFunction1))(
    context: Context,
    definition: GlanceStateDefinition<T>,
    glanceId: GlanceId,
    updateState: suspend (T) -> T
): T
```
| **This function is deprecated.**   
| glance-wear-tiles is deprecated and will be removed

Update the state of a wear tile.

The state definition must be the one used for this particular tile service.  

|                                                               Parameters                                                               |
|----------------------------------------------------------------------------------------------------------------------------------------|-----------------------------------------------|
| `context: `[Context](https://developer.android.com/reference/android/content/Context.html)                                             | the context used to create this state         |
| `definition: `[GlanceStateDefinition](https://developer.android.com/reference/kotlin/androidx/glance/state/GlanceStateDefinition)`<T>` | the configuration that defines this state     |
| `glanceId: `[GlanceId](https://developer.android.com/reference/kotlin/androidx/glance/GlanceId)                                        | the glance id of this particular tile service |
| `updateState: suspend (T) `->` T`                                                                                                      | the block defines how the state to be updated |