From 0d41514ccc3832fe0f2ba7b4aed76131c8d0897d Mon Sep 17 00:00:00 2001 From: Gautier de Lataillade Date: Mon, 18 Mar 2024 14:09:34 +0100 Subject: [PATCH] Update PendingIntent flags in AlarmReceiver --- .../main/kotlin/com/gdelataillade/alarm/alarm/AlarmReceiver.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/android/src/main/kotlin/com/gdelataillade/alarm/alarm/AlarmReceiver.kt b/android/src/main/kotlin/com/gdelataillade/alarm/alarm/AlarmReceiver.kt index 21f089f2..cbe6b255 100644 --- a/android/src/main/kotlin/com/gdelataillade/alarm/alarm/AlarmReceiver.kt +++ b/android/src/main/kotlin/com/gdelataillade/alarm/alarm/AlarmReceiver.kt @@ -13,7 +13,7 @@ class AlarmReceiver : BroadcastReceiver() { serviceIntent.putExtras(intent) if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.S) { - val pendingIntent = PendingIntent.getForegroundService(context, 1, serviceIntent, PendingIntent.FLAG_IMMUTABLE) + val pendingIntent = PendingIntent.getForegroundService(context, 1, serviceIntent, PendingIntent.FLAG_IMMUTABLE or PendingIntent.FLAG_UPDATE_CURRENT) pendingIntent.send() } else if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) { context.startForegroundService(serviceIntent)