From f1dfb00ae0e1ab222a0f6b67b88a9d7ad1819e74 Mon Sep 17 00:00:00 2001 From: Dariusz Olszewski Date: Mon, 6 Jun 2022 00:10:51 +0200 Subject: [PATCH] Use unique request code to make sure that a new PendingIntent gets created for each notification Signed-off-by: Dariusz Olszewski --- .../java/com/nextcloud/talk/jobs/NotificationWorker.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/com/nextcloud/talk/jobs/NotificationWorker.java b/app/src/main/java/com/nextcloud/talk/jobs/NotificationWorker.java index eebb764d3..ff241bf72 100644 --- a/app/src/main/java/com/nextcloud/talk/jobs/NotificationWorker.java +++ b/app/src/main/java/com/nextcloud/talk/jobs/NotificationWorker.java @@ -292,7 +292,10 @@ public class NotificationWorker extends Worker { } } - PendingIntent pendingIntent = PendingIntent.getActivity(context, 0, intent, 0); + // Use unique request code to make sure that a new PendingIntent gets created for each notification + // See https://github.com/nextcloud/talk-android/issues/2111 + int requestCode = (int) System.currentTimeMillis(); + PendingIntent pendingIntent = PendingIntent.getActivity(context, requestCode, intent, 0); Uri uri = Uri.parse(signatureVerification.getUserEntity().getBaseUrl()); String baseUrl = uri.getHost();