use a different channel id for every sound uri

This commit is contained in:
tibbi 2018-04-11 20:04:36 +02:00
parent 6ae89328a2
commit ac95ff8adc
1 changed files with 2 additions and 2 deletions

View File

@ -248,7 +248,7 @@ fun Context.getTimerNotification(pendingIntent: PendingIntent, addDeleteIntent:
grantReadUriPermission(soundUri)
}
val channelId = "my_timer_channel"
val channelId = "simple_timer_channel_$soundUri"
if (isOreoPlus()) {
val audioAttributes = AudioAttributes.Builder()
.setUsage(AudioAttributes.USAGE_NOTIFICATION)
@ -320,7 +320,7 @@ fun Context.getAlarmNotification(pendingIntent: PendingIntent, alarm: Alarm, add
grantReadUriPermission(soundUri)
}
val channelId = "my_alarm_channel"
val channelId = "simple_alarm_channel_$soundUri"
val label = if (alarm.label.isNotEmpty()) alarm.label else getString(R.string.alarm)
if (isOreoPlus()) {
val audioAttributes = AudioAttributes.Builder()