android: remove singleInstance launchMode, add SINGLE and CLEAR TOP flags to the intent (#290)

This commit is contained in:
steedems 2017-06-14 22:00:38 +02:00 committed by Sebastián Katzer
parent 609ba41ae0
commit e9f072210e
2 changed files with 1 additions and 1 deletions

View File

@ -66,7 +66,6 @@
<config-file target="res/xml/config.xml" parent="/*">
<preference name="KeepRunning" value="true" />
<preference name="AndroidLaunchMode" value="singleInstance"/>
</config-file>
<config-file target="AndroidManifest.xml" parent="/manifest/application">

View File

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