# ActionCallback

# ActionCallback

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/action/RunCallbackAction.kt+class:androidx.glance.wear.tiles.action.ActionCallback)  
Added in[1.0.0-alpha07](https://developer.android.com/jetpack/androidx/releases/glance#1.0.0-alpha07)  
Deprecated in[1.0.0-alpha07](https://developer.android.com/jetpack/androidx/releases/glance#1.0.0-alpha07)

<br />

```
interface ActionCallback
```

<br />

*** ** * ** ***

| **This interface is deprecated.**   
| glance-wear-tiles is deprecated and will be removed

A callback executed in response to the user action, before the content is updated. The implementing class must have a public zero argument constructor, this is used to instantiate the class at runtime.

## Summary

|                                  ### Public functions                                   |
|-----------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `suspend `[Unit](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html) | ~~[onAction](https://developer.android.com/reference/kotlin/androidx/glance/wear/tiles/action/ActionCallback#onAction(android.content.Context,androidx.glance.GlanceId))~~`(context: `[Context](https://developer.android.com/reference/android/content/Context.html)`, glanceId: `[GlanceId](https://developer.android.com/reference/kotlin/androidx/glance/GlanceId)`)` **This function is deprecated.**glance-wear-tiles is deprecated and will be removed |

## Public functions

### onAction

Added in[1.0.0-alpha07](https://developer.android.com/jetpack/androidx/releases/glance#1.0.0-alpha07)  
Deprecated in[1.0.0-alpha07](https://developer.android.com/jetpack/androidx/releases/glance#1.0.0-alpha07)  

```
suspend fun [onAction](https://developer.android.com/reference/kotlin/androidx/glance/wear/tiles/action/ActionCallback#onAction(android.content.Context,androidx.glance.GlanceId))(context: Context, glanceId: GlanceId): Unit
```
| **This function is deprecated.**   
| glance-wear-tiles is deprecated and will be removed

Performs the work associated with this action. Called when the action is triggered.  

|                                           Parameters                                            |
|-------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------|
| `context: `[Context](https://developer.android.com/reference/android/content/Context.html)      | the calling context                                                                                              |
| `glanceId: `[GlanceId](https://developer.android.com/reference/kotlin/androidx/glance/GlanceId) | the[GlanceId](https://developer.android.com/reference/kotlin/androidx/glance/GlanceId)that triggered this action |