updateWearTileState

Function

Android
public suspend fun <T> updateWearTileState(
    context: Context,
    definition: GlanceStateDefinition<T>,
    glanceId: GlanceId,
    updateState: suspend (T) -> T
): T

Update the state of a wear tile.

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

Parameters

contextthe context used to create this state
definitionthe configuration that defines this state
glanceIdthe glance id of this particular tile service
updateStatethe block defines how the state to be updated