Make full screen notifications required for alarms

This commit is contained in:
Ensar Sarajčić 2023-08-04 14:33:20 +02:00
parent 111d759913
commit 3e83e61748
2 changed files with 1 additions and 9 deletions

View file

@ -18,10 +18,6 @@ fun BaseSimpleActivity.handleFullScreenNotificationsPermission(callback: (grante
textId = R.string.allow_full_screen_notifications_reminders,
positiveActionCallback = {
openFullScreenIntentSettings(BuildConfig.APPLICATION_ID)
},
negativeActionCallback = {
// It is not critical to have full screen intents, so we should allow users to continue using the app
callback(true)
}
)
}

View file

@ -59,11 +59,7 @@ class AlarmReceiver : BroadcastReceiver() {
.setAutoCancel(true)
.setPriority(NotificationCompat.PRIORITY_HIGH)
.setCategory(NotificationCompat.CATEGORY_ALARM)
.also {
if (context.canUseFullScreenIntent()) {
it.setFullScreenIntent(pendingIntent, true)
}
}
.setFullScreenIntent(pendingIntent, true)
try {
notificationManager.notify(ALARM_NOTIF_ID, builder.build())