display Notification

fun Context?.displayNotification(    channelId: String,     title: String,     message: String,     @DrawableRes notifIcon: Int,     notificationId: Int = 0,     pendingIntent: PendingIntent? = null)

Method to displaying notification

Parameters

channelId

the notification channel id, required from Android Oreo

title

the title of the notification

message

the content text of the notification

notifIcon

drawable resource id for notification

notificationId

notification Id to identify the notification

pendingIntent

intent or operation to do when notification clicked

Sources

Link copied to clipboard