notify

fun Context.notify(id: Int, channelId: String, channelName: String, shouldInitializeChannel: Boolean = false, block: NotificationCompat.Builder.() -> Unit? = null)

Creates and shows a notification with the given parameters.

Parameters

id

The unique identifier for this notification.

channelId

The ID of the notification channel.

channelName

The name of the notification channel.

shouldInitializeChannel

Whether to initialize the notification channel if it doesn't exist.

block

An optional lambda to configure the NotificationCompat.Builder.


fun Context.notify(id: Int, notification: Notification)

Shows a notification with the given ID and Notification object.

Parameters

id

The unique identifier for this notification.

notification

The Notification object to be displayed.


Shows multiple notifications at once.

Parameters

notificationWithIdAndTags

A list of NotificationWithIdAndTag objects to be displayed.