-
-
Save Arunshaik2001/1d2fcab932df835f0ad3e938dad8eb20 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
fun createNotificationChannel() { | |
if (Build.VERSION.SDK_INT > Build.VERSION_CODES.O) { | |
val notificationChannel = NotificationChannel( | |
"channel_id_1", | |
"channel1", | |
NotificationManager.IMPORTANCE_DEFAULT | |
) | |
notificationChannel.description = "My first notification channel" | |
val notificationManager = getSystemService(NOTIFICATION_SERVICE) as NotificationManager | |
notificationManager.createNotificationChannel(notificationChannel) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment