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 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;