From 1297b88918b7cb0b74187f0433b53a07779ffdce Mon Sep 17 00:00:00 2001 From: tibbi Date: Wed, 28 Mar 2018 14:13:12 +0200 Subject: [PATCH] make sure the notification sound uses the system stream --- .../com/simplemobiletools/calendar/extensions/Context.kt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/src/main/kotlin/com/simplemobiletools/calendar/extensions/Context.kt b/app/src/main/kotlin/com/simplemobiletools/calendar/extensions/Context.kt index e12ff3889..6fbeaf7a8 100644 --- a/app/src/main/kotlin/com/simplemobiletools/calendar/extensions/Context.kt +++ b/app/src/main/kotlin/com/simplemobiletools/calendar/extensions/Context.kt @@ -10,6 +10,7 @@ import android.content.Context import android.content.Intent import android.content.res.Resources import android.database.ContentObserver +import android.media.AudioManager import android.net.Uri import android.os.Bundle import android.provider.CalendarContract @@ -204,7 +205,7 @@ private fun getNotification(context: Context, pendingIntent: PendingIntent, even .setPriority(Notification.PRIORITY_HIGH) .setDefaults(Notification.DEFAULT_LIGHTS) .setAutoCancel(true) - .setSound(soundUri) + .setSound(soundUri, AudioManager.STREAM_SYSTEM) .setChannelId(channelId) .addAction(R.drawable.ic_snooze, context.getString(R.string.snooze), getSnoozePendingIntent(context, event))