make sure the notification sound uses the system stream
This commit is contained in:
parent
7ee682f32a
commit
1297b88918
|
@ -10,6 +10,7 @@ import android.content.Context
|
||||||
import android.content.Intent
|
import android.content.Intent
|
||||||
import android.content.res.Resources
|
import android.content.res.Resources
|
||||||
import android.database.ContentObserver
|
import android.database.ContentObserver
|
||||||
|
import android.media.AudioManager
|
||||||
import android.net.Uri
|
import android.net.Uri
|
||||||
import android.os.Bundle
|
import android.os.Bundle
|
||||||
import android.provider.CalendarContract
|
import android.provider.CalendarContract
|
||||||
|
@ -204,7 +205,7 @@ private fun getNotification(context: Context, pendingIntent: PendingIntent, even
|
||||||
.setPriority(Notification.PRIORITY_HIGH)
|
.setPriority(Notification.PRIORITY_HIGH)
|
||||||
.setDefaults(Notification.DEFAULT_LIGHTS)
|
.setDefaults(Notification.DEFAULT_LIGHTS)
|
||||||
.setAutoCancel(true)
|
.setAutoCancel(true)
|
||||||
.setSound(soundUri)
|
.setSound(soundUri, AudioManager.STREAM_SYSTEM)
|
||||||
.setChannelId(channelId)
|
.setChannelId(channelId)
|
||||||
.addAction(R.drawable.ic_snooze, context.getString(R.string.snooze), getSnoozePendingIntent(context, event))
|
.addAction(R.drawable.ic_snooze, context.getString(R.string.snooze), getSnoozePendingIntent(context, event))
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue