mirror of
https://github.com/SimpleMobileTools/Simple-Calendar.git
synced 2025-06-05 21:59:17 +02:00
use the Alarm stream for reminders so it is played properly in DND mode too
This commit is contained in:
@@ -295,7 +295,7 @@ class SettingsActivity : SimpleActivity() {
|
|||||||
settings_reminder_sound.text = config.reminderSoundTitle
|
settings_reminder_sound.text = config.reminderSoundTitle
|
||||||
|
|
||||||
settings_reminder_sound_holder.setOnClickListener {
|
settings_reminder_sound_holder.setOnClickListener {
|
||||||
SelectAlarmSoundDialog(this, config.reminderSoundUri, AudioManager.STREAM_NOTIFICATION, GET_RINGTONE_URI, ALARM_SOUND_TYPE_NOTIFICATION, false,
|
SelectAlarmSoundDialog(this, config.reminderSoundUri, AudioManager.STREAM_ALARM, GET_RINGTONE_URI, ALARM_SOUND_TYPE_NOTIFICATION, false,
|
||||||
onAlarmPicked = {
|
onAlarmPicked = {
|
||||||
if (it != null) {
|
if (it != null) {
|
||||||
updateReminderSound(it)
|
updateReminderSound(it)
|
||||||
|
@@ -221,7 +221,7 @@ fun Context.getNotification(pendingIntent: PendingIntent, event: Event, content:
|
|||||||
.setPriority(Notification.PRIORITY_HIGH)
|
.setPriority(Notification.PRIORITY_HIGH)
|
||||||
.setDefaults(Notification.DEFAULT_LIGHTS)
|
.setDefaults(Notification.DEFAULT_LIGHTS)
|
||||||
.setAutoCancel(true)
|
.setAutoCancel(true)
|
||||||
.setSound(Uri.parse(soundUri), AudioManager.STREAM_NOTIFICATION)
|
.setSound(Uri.parse(soundUri), AudioManager.STREAM_ALARM)
|
||||||
.setChannelId(channelId)
|
.setChannelId(channelId)
|
||||||
.addAction(R.drawable.ic_snooze, getString(R.string.snooze), getSnoozePendingIntent(this, event))
|
.addAction(R.drawable.ic_snooze, getString(R.string.snooze), getSnoozePendingIntent(this, event))
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user