RichUtils / pyxis.uzuki.live.richutilskt.utils / createNotificationChannel

createNotificationChannel

fun createNotificationChannel(id: String = "", name: String = "", description: String = "", importance: Int = NotificationManager.IMPORTANCE_LOW): String

create Notification Channel for Android Oreo and above. every options is optional, if you doesn't matter whatever value, leave them no parameters.

this methods can use Global android.content.Context. You can initialize Global Context by RichUtils.initializeApplication

Parameters

id - channel id, if this value is not present, it will be package name

name - channel name, if this value is not present, it will be app name

description - channel description, if this value is not present, it will be app name

importance - importance of channel, if this value is not present, it will be IMPORTANCE_LOW

Return
generated channel id