Hi, did anyone there made their
NotificationCompat
Kotlin extensions? I personally made some, and I'm looking for folks to discuss API design regarding extensions for these APIs. I'm looking forward exchanging inspiration to get to a DSL that is the lest error-prone and forget-prone possible, and very readable (can't stand these
NotificationCompat.PRIORITY_
and similar prefixes).
Right, this is what I have, and I know I can make improvements, but I'd like to bounce off improvement ideas.
val notification = buildNotification(ChannelIds.Something) {
priority = NotificationCompat.PRIORITY_MAX
category = NotificationCompat.CATEGORY_STATUS
visibility = Public
contentText = "Some content text"
smallIcon = R.drawable.ic_some_icon_white_24dp
}