Skip to content

Commit 0dc51cd

Browse files
authored
fix: setting lockscreen visibility to public (#747)
* setting lockscreen visibility to public * fix
1 parent 51a3072 commit 0dc51cd

File tree

1 file changed

+9
-5
lines changed

1 file changed

+9
-5
lines changed

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

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,8 @@ internal class StreamNotificationBuilderImpl(
145145
if (!contentText.isNullOrEmpty()) {
146146
setContentText(contentText)
147147
}
148-
priority = NotificationCompat.PRIORITY_LOW
148+
149+
priority = NotificationCompat.PRIORITY_MAX
149150

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

@@ -178,7 +179,7 @@ internal class StreamNotificationBuilderImpl(
178179
setSilent(true)
179180
setSound(null)
180181

181-
priority = NotificationCompat.PRIORITY_LOW
182+
priority = NotificationCompat.PRIORITY_MAX
182183

183184
val notificationLargeLayout = NotificationLayout(
184185
context, R.layout.stream_notification_large,
@@ -224,11 +225,14 @@ internal class StreamNotificationBuilderImpl(
224225
@RequiresApi(Build.VERSION_CODES.O)
225226
private fun getDefaultNotificationChannel(context: Context): (() -> NotificationChannel) {
226227
return {
227-
NotificationChannel(
228+
val channel = NotificationChannel(
228229
context.getString(R.string.stream_call_notification_channel_id),
229230
context.getString(R.string.stream_call_notification_channel_name),
230-
NotificationManager.IMPORTANCE_DEFAULT,
231+
NotificationManager.IMPORTANCE_HIGH
231232
)
233+
234+
channel.lockscreenVisibility = NotificationCompat.VISIBILITY_PUBLIC
235+
channel
232236
}
233237
}
234238

@@ -306,4 +310,4 @@ class NotificationLayout(
306310
setViewVisibility(R.id.avatar, View.VISIBLE)
307311
}
308312

309-
}
313+
}

0 commit comments

Comments
 (0)