@Deprecated("glance-wear-tiles is deprecated and will be removed")
@Suppress("deprecation") // For backwards compatibility.
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() {
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. |
## Properties
<h3 id="statedefinition">stateDefinition</h3>
> Source set: Android
public open val stateDefinition: GlanceStateDefinition<*>? = null
Data store for tile data specific to this service
<h3 id="timelinemode">timelineMode</h3>
> Source set: Android
public open val timelineMode: TimelineMode = TimelineMode.SingleEntry
Defines the handling of timeline
## Functions
<h3 id="oncreate">onCreate</h3>
> Source set: Android
override fun onCreate()
<h3 id="onbind-intent">onBind</h3>
> Source set: Android
override fun onBind(intent: Intent): IBinder?
<h3 id="ondestroy">onDestroy</h3>
> Source set: Android
override fun onDestroy()
<h3 id="gettilestate">getTileState</h3>
> Source set: Android
public suspend fun
Retrieve the state of the wear tile provided by this service
<h3 id="updatetilestate-updatestate">updateTileState</h3>
> Source set: Android
public suspend fun
Update the state of the wear tile provided by this service
<h3 id="content">Content</h3>
> Source set: Android
@Composable @GlanceComposable public abstract fun Content()
Override this method to set the layout to use in your Tile.
<h3 id="ontileremoveevent-requestparams">onTileRemoveEvent</h3>
> Source set: Android
override fun onTileRemoveEvent(requestParams: TileRemoveEvent)