NotificationActionsFactory

Factory for creating NotificationCompat.Action instances used in chat push notifications.

This factory provides convenient methods to create common notification actions such as "Mark as Read" and "Reply" with sensible defaults, while allowing full customization.

See also

Functions

Link copied to clipboard
fun createMarkReadAction(context: Context, notificationId: Int, channel: Channel, message: Message, @DrawableRes icon: Int = android.R.drawable.ic_menu_view, title: String = context.getString(R.string.stream_chat_notification_read), pendingIntent: PendingIntent = createMarkReadPendingIntent(context, notificationId, channel, message)): NotificationCompat.Action

Creates a "Mark as Read" notification action.

Link copied to clipboard
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.