Skip to content

Commit 5e3a4f3

Browse files
authored
set call notifications to low priority with no sound (#652)
1 parent 6d7e9b7 commit 5e3a4f3

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

packages/stream_video_flutter/android/src/main/kotlin/io/getstream/video/flutter/stream_video_flutter/service/notification/StreamNotificationBuilderImpl.kt

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,7 @@ internal class StreamNotificationBuilderImpl(
136136

137137
setOngoing(true)
138138
setSilent(true)
139+
setSound(null)
139140
setContentIntent(contentIntent)
140141
setCategory(NotificationCompat.CATEGORY_CALL)
141142
setDefaults(NotificationCompat.DEFAULT_ALL)
@@ -144,7 +145,7 @@ internal class StreamNotificationBuilderImpl(
144145
if (!contentText.isNullOrEmpty()) {
145146
setContentText(contentText)
146147
}
147-
priority = NotificationCompat.PRIORITY_MAX
148+
priority = NotificationCompat.PRIORITY_LOW
148149

149150
addAction(actionBuilder.createCancelAction(getNotificationId(), payload.callCid, type))
150151

@@ -174,8 +175,10 @@ internal class StreamNotificationBuilderImpl(
174175
setCategory(NotificationCompat.CATEGORY_CALL)
175176
setDefaults(NotificationCompat.DEFAULT_ALL)
176177
setAutoCancel(false)
178+
setSilent(true)
179+
setSound(null)
177180

178-
priority = NotificationCompat.PRIORITY_MAX
181+
priority = NotificationCompat.PRIORITY_LOW
179182

180183
val notificationLargeLayout = NotificationLayout(
181184
context, R.layout.stream_notification_large,

0 commit comments

Comments
 (0)