getPushActionIntent

fun MindboxRemoteMessage.getPushActionIntent(context: Context, activity: Class<out Activity>, notificationId: Int, pushAction: PushAction, extras: Bundle? = null): PendingIntent?

Creates a PendingIntent for the push notification action button.

This method creates a PendingIntent with both the unique push key and the unique push button key in the extras. These are used by the Mindbox SDK to properly identify and handle push notification button clicks.

Note: Use this method to get the PendingIntent for androidx.core.app.NotificationCompat.Builder.addAction.

Return

A PendingIntent to be used with androidx.core.app.NotificationCompat.Builder.addAction.

Parameters

context

The context used to create the PendingIntent.

activity

The activity class to be launched when the action is clicked.

notificationId

The unique ID of the notification.

pushAction

The action object containing the button's unique key and other details.

extras

Additional data to be included in the intent.