From e9f072210e88a71d5cfd4eac00123b84a4d5e4c4 Mon Sep 17 00:00:00 2001 From: steedems Date: Wed, 14 Jun 2017 22:00:38 +0200 Subject: [PATCH] android: remove singleInstance launchMode, add SINGLE and CLEAR TOP flags to the intent (#290) --- plugin.xml | 1 - src/android/ForegroundService.java | 1 + 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/plugin.xml b/plugin.xml index 8e9f5c8..0c5372a 100644 --- a/plugin.xml +++ b/plugin.xml @@ -66,7 +66,6 @@ - diff --git a/src/android/ForegroundService.java b/src/android/ForegroundService.java index ca9bb27..e313082 100644 --- a/src/android/ForegroundService.java +++ b/src/android/ForegroundService.java @@ -180,6 +180,7 @@ public class ForegroundService extends Service { setColor(notification, settings); if (intent != null && settings.optBoolean("resume")) { + intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP | Intent.FLAG_ACTIVITY_SINGLE_TOP); PendingIntent contentIntent = PendingIntent.getActivity( context, NOTIFICATION_ID, intent, PendingIntent.FLAG_UPDATE_CURRENT);