Allow PRIORITY_HIGH notifications to bypass DND with normal beep
PRIORITY_MAX still plays the insistent looping alarm until manually stopped. PRIORITY_HIGH now also bypasses DND but uses the standard notification sound + vibration pattern (no looping alarm). Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
parent
70806dcadc
commit
e3231970a3
1 changed files with 1 additions and 0 deletions
|
|
@ -381,6 +381,7 @@ class NotificationService(val context: Context) {
|
|||
PRIORITY_HIGH -> {
|
||||
val channel = NotificationChannel(channelId, context.getString(R.string.common_priority_high_name), NotificationManager.IMPORTANCE_HIGH)
|
||||
channel.enableVibration(true)
|
||||
channel.setBypassDnd(true) // Bypass DND but do not play insistent alarm
|
||||
channel.vibrationPattern = longArrayOf(
|
||||
pause, 100, pause, 100, pause, 100,
|
||||
pause, 2000
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue