Skip to content

Commit

Permalink
fix: setting lockscreen visibility to public (#747)
Browse files Browse the repository at this point in the history
* setting lockscreen visibility to public

* fix
  • Loading branch information
Brazol authored Sep 6, 2024
1 parent 51a3072 commit 0dc51cd
Showing 1 changed file with 9 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,8 @@ internal class StreamNotificationBuilderImpl(
if (!contentText.isNullOrEmpty()) {
setContentText(contentText)
}
priority = NotificationCompat.PRIORITY_LOW

priority = NotificationCompat.PRIORITY_MAX

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

Expand Down Expand Up @@ -178,7 +179,7 @@ internal class StreamNotificationBuilderImpl(
setSilent(true)
setSound(null)

priority = NotificationCompat.PRIORITY_LOW
priority = NotificationCompat.PRIORITY_MAX

val notificationLargeLayout = NotificationLayout(
context, R.layout.stream_notification_large,
Expand Down Expand Up @@ -224,11 +225,14 @@ internal class StreamNotificationBuilderImpl(
@RequiresApi(Build.VERSION_CODES.O)
private fun getDefaultNotificationChannel(context: Context): (() -> NotificationChannel) {
return {
NotificationChannel(
val channel = NotificationChannel(
context.getString(R.string.stream_call_notification_channel_id),
context.getString(R.string.stream_call_notification_channel_name),
NotificationManager.IMPORTANCE_DEFAULT,
NotificationManager.IMPORTANCE_HIGH
)

channel.lockscreenVisibility = NotificationCompat.VISIBILITY_PUBLIC
channel
}
}

Expand Down Expand Up @@ -306,4 +310,4 @@ class NotificationLayout(
setViewVisibility(R.id.avatar, View.VISIBLE)
}

}
}

0 comments on commit 0dc51cd

Please sign in to comment.