From 25d5975e6c3137e5e1f35e5be9d3fdd4b5c19d48 Mon Sep 17 00:00:00 2001 From: Rehan Date: Tue, 17 Oct 2023 20:48:34 +0500 Subject: [PATCH] added comments --- .../customer/messagingpush/CustomerIOPushNotificationHandler.kt | 1 + 1 file changed, 1 insertion(+) diff --git a/messagingpush/src/main/java/io/customer/messagingpush/CustomerIOPushNotificationHandler.kt b/messagingpush/src/main/java/io/customer/messagingpush/CustomerIOPushNotificationHandler.kt index 053f1f61c..196ef4775 100644 --- a/messagingpush/src/main/java/io/customer/messagingpush/CustomerIOPushNotificationHandler.kt +++ b/messagingpush/src/main/java/io/customer/messagingpush/CustomerIOPushNotificationHandler.kt @@ -226,6 +226,7 @@ internal class CustomerIOPushNotificationHandler( ): PendingIntent { val notifyIntent = Intent(context, NotificationClickReceiverActivity::class.java) notifyIntent.putExtra(NotificationClickReceiverActivity.NOTIFICATION_PAYLOAD_EXTRA, payload) + // Without these flags, Android OS does not launch activity again in one session if the activity was recently launched notifyIntent.flags = Intent.FLAG_ACTIVITY_NEW_TASK or Intent.FLAG_ACTIVITY_CLEAR_TASK // In Android M, you must specify the mutability of each PendingIntent val flags = if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {