Skip to content

Commit

Permalink
Disable sound on notification channel
Browse files Browse the repository at this point in the history
  • Loading branch information
alexandr7035 committed Nov 7, 2021
1 parent 122b44c commit 9126fe9
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions app/src/main/java/by/alexandr7035/gitstat/core/App.kt
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,11 @@ class App : Application() {
// Create the NotificationChannel
val name = getString(R.string.fg_notification_channel)
val importance = NotificationManager.IMPORTANCE_HIGH
val mChannel = NotificationChannel(getString(R.string.NOTIFICATION_CHANNEL_ID), name, importance)
val channel = NotificationChannel(getString(R.string.NOTIFICATION_CHANNEL_ID), name, importance)
channel.setSound(null, null)

val notificationManager = getSystemService(NOTIFICATION_SERVICE) as NotificationManager
notificationManager.createNotificationChannel(mChannel)
notificationManager.createNotificationChannel(channel)
}
}
}

0 comments on commit 9126fe9

Please sign in to comment.