Make full screen notifications required for alarms
This commit is contained in:
parent
111d759913
commit
3e83e61748
2 changed files with 1 additions and 9 deletions
|
@ -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)
|
||||
}
|
||||
)
|
||||
}
|
||||
|
|
|
@ -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())
|
||||
|
|
Loading…
Reference in a new issue