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

```kotlin
public interface ActionCallback
```

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.

## Functions

<h2 id="onaction-context-glanceid-parameters">onAction</h2>

```kotlin
public suspend fun onAction(context: Context, glanceId: GlanceId, parameters: ActionParameters)
```

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

#### Parameters

| | |
| --- | --- |
| context | the calling context |
| glanceId | the [GlanceId](/jetpack-compose/androidx.glance/glance/interfaces/GlanceId) that triggered this action |
| parameters | the parameters associated with the action |