createReplyAction

fun createReplyAction(context: Context, notificationId: Int, channel: Channel, @DrawableRes icon: Int = android.R.drawable.ic_menu_send, title: String = context.getString(R.string.stream_chat_notification_reply), hint: String = context.getString(R.string.stream_chat_notification_type_hint), pendingIntent: PendingIntent = createReplyPendingIntent(context, notificationId, channel)): NotificationCompat.Action

Creates a "Reply" notification action with inline reply support.

This action displays an inline text input field (on supported devices) allowing users to reply directly from the notification without opening the app.

Return

A NotificationCompat.Action configured for inline reply.

Parameters

context

The Context used to access resources and create the pending intent.

notificationId

The unique identifier for the notification. Used for the pending intent request code.

channel

The Channel to send the reply message to.

icon

The drawable resource ID for the action icon. Defaults to android.R.drawable.ic_menu_send.

title

The label text displayed on the action button. Defaults to the localized "Reply" string.

hint

The placeholder text shown in the inline reply input field. Defaults to the localized "Type a message" string.

pendingIntent

The PendingIntent to execute when the reply is submitted. Defaults to a broadcast intent which sends a message in the channel.