---
title: "GlanceTileService"
description: "[TileService] which can consume a Glance composition, convert it to a Wear Tile, and provide it
to the system. You must implement the [Content] function to provide your Tile layout, for
example:
```
class MyTile: GlanceTileService() { @Composable @GlanceComposable override fun Content {   Text(\"Hello World!\") }
}
```

You must also register ComposeTileService instances in your manifest to allow the system to
discover them. Your service must include an intent filter for the action
`androidx.wear.tiles.action.BIND_TILE_PROVIDER`, and require the permission
`com.google.android.wearable.permission.BIND_TILE_PROVIDER`."
type: "class"
---

<div class='type'>Class</div>


<a id='references'></a>

<div class='sourceset sourceset-android'>Android</div>


> **Deprecated** glance-wear-tiles is deprecated and will be removed

```kotlin
public abstract class GlanceTileService(
    private val errorUiLayout: androidx.wear.tiles.LayoutElementBuilders.LayoutElement? =
        errorUiLayout()
) : TileService()
```


`TileService` which can consume a Glance composition, convert it to a Wear Tile, and provide it
to the system. You must implement the `Content` function to provide your Tile layout, for
example:
```
class MyTile: GlanceTileService() { @Composable @GlanceComposable override fun Content {   Text("Hello World!") }
}
```

You must also register ComposeTileService instances in your manifest to allow the system to
discover them. Your service must include an intent filter for the action
`androidx.wear.tiles.action.BIND_TILE_PROVIDER`, and require the permission
`com.google.android.wearable.permission.BIND_TILE_PROVIDER`.

#### Parameters

| | |
| --- | --- |
| errorUiLayout | If not null and an error occurs within this glance wear tile, the tile is updated with an error UI using the provided layout. |



## Functions

```kotlin
public suspend fun <T> getTileState(): T
```


Retrieve the state of the wear tile provided by this service


```kotlin
public suspend fun <T> updateTileState(updateState: suspend (T) -> T): T
```


Update the state of the wear tile provided by this service


```kotlin
@Composable @GlanceComposable public abstract fun Content()
```


Override this method to set the layout to use in your Tile.



