From fe000e9fc4302159cc4f2f623e0d6a9d17f7a517 Mon Sep 17 00:00:00 2001 From: Yash Date: Mon, 20 Mar 2023 14:55:05 +0530 Subject: [PATCH 1/2] Fix flags on PendingIntent for Android 12 support --- .../com/leetaehong/foregroundservice/NotificationHelper.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/android/src/main/java/com/leetaehong/foregroundservice/NotificationHelper.java b/android/src/main/java/com/leetaehong/foregroundservice/NotificationHelper.java index 7bfed4e..fbfe06e 100644 --- a/android/src/main/java/com/leetaehong/foregroundservice/NotificationHelper.java +++ b/android/src/main/java/com/leetaehong/foregroundservice/NotificationHelper.java @@ -88,7 +88,7 @@ Notification buildNotification(Context context, Bundle notificationConfig,Notifi return null; } Intent notificationIntent = new Intent(context, mainActivityClass); - PendingIntent pendingIntent = PendingIntent.getActivity(context, 0, notificationIntent, 0); + PendingIntent pendingIntent = PendingIntent.getActivity(context, 0, notificationIntent, PendingIntent.FLAG_IMMUTABLE); Notification.Builder notificationBuilder; From 5415e5c6f4f43af04a2557dc3d172ef6beb8f89a Mon Sep 17 00:00:00 2001 From: yashcoders <109526684+yashcoders@users.noreply.github.com> Date: Thu, 9 Nov 2023 15:24:45 +0530 Subject: [PATCH 2/2] Update gradle.properties --- android/gradle.properties | 1 + 1 file changed, 1 insertion(+) diff --git a/android/gradle.properties b/android/gradle.properties index e69de29..f2bf423 100644 --- a/android/gradle.properties +++ b/android/gradle.properties @@ -0,0 +1 @@ +android.disableAutomaticComponentCreation=true