pendingIntentAction

Functions summary

Action

Creates an Action that triggers a PendingIntent.

Functions

@Composable
fun pendingIntentAction(pendingIntent: (Context) -> PendingIntent): Action

Creates an Action that triggers a PendingIntent.

The PendingIntent is not serialized into the document. It is stored in androidx.compose.remote.creation.compose.capture.CapturedDocument.pendingIntents, keyed by its index, and the host sends it when the action runs.

Parameters
pendingIntent: (Context) -> PendingIntent

A lambda that returns the PendingIntent to trigger. The Context is provided to the lambda to ensure it's available during serialization.