mirror of
https://bitbucket.org/TheBosZ/cordova-plugin-run-in-background
synced 2024-12-23 05:47:35 +00:00
android: remove singleInstance launchMode, add SINGLE and CLEAR TOP flags to the intent (#290)
This commit is contained in:
parent
609ba41ae0
commit
e9f072210e
@ -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">
|
||||
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user