Skip to content

Commit

Permalink
Fix channel
Browse files Browse the repository at this point in the history
  • Loading branch information
kobakei committed Feb 3, 2018
1 parent 753c52e commit ed9042b
Showing 1 changed file with 1 addition and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,7 @@ class NotificationUtility {
fun setUpNotificationChannel(context: Context) {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
val channel1 = NotificationChannel(CHANNEL_ID_NORMAL, "普通のチャンネル", NotificationManager.IMPORTANCE_DEFAULT)
val channel2 = NotificationChannel(CHANNEL_ID_IMPORTANT, "重要なチャンネル", NotificationManager.IMPORTANCE_DEFAULT).apply {
importance = NotificationManager.IMPORTANCE_HIGH
}
val channel2 = NotificationChannel(CHANNEL_ID_IMPORTANT, "重要なチャンネル", NotificationManager.IMPORTANCE_HIGH)
val nm = context.getSystemService(Context.NOTIFICATION_SERVICE) as NotificationManager
nm.createNotificationChannel(channel1)
nm.createNotificationChannel(channel2)
Expand Down

0 comments on commit ed9042b

Please sign in to comment.