Skip to content

Commit

Permalink
Update Android PendingIntent flags in AlarmReceiver
Browse files Browse the repository at this point in the history
  • Loading branch information
gdelataillade committed Mar 18, 2024
1 parent f2823c5 commit f7a71d7
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit f7a71d7

Please sign in to comment.