mirror of
https://bitbucket.org/TheBosZ/cordova-plugin-run-in-background
synced 2024-11-14 19:44:53 +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="/*">
|
<config-file target="res/xml/config.xml" parent="/*">
|
||||||
<preference name="KeepRunning" value="true" />
|
<preference name="KeepRunning" value="true" />
|
||||||
<preference name="AndroidLaunchMode" value="singleInstance"/>
|
|
||||||
</config-file>
|
</config-file>
|
||||||
|
|
||||||
<config-file target="AndroidManifest.xml" parent="/manifest/application">
|
<config-file target="AndroidManifest.xml" parent="/manifest/application">
|
||||||
|
@ -180,6 +180,7 @@ public class ForegroundService extends Service {
|
|||||||
setColor(notification, settings);
|
setColor(notification, settings);
|
||||||
|
|
||||||
if (intent != null && settings.optBoolean("resume")) {
|
if (intent != null && settings.optBoolean("resume")) {
|
||||||
|
intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP | Intent.FLAG_ACTIVITY_SINGLE_TOP);
|
||||||
PendingIntent contentIntent = PendingIntent.getActivity(
|
PendingIntent contentIntent = PendingIntent.getActivity(
|
||||||
context, NOTIFICATION_ID, intent,
|
context, NOTIFICATION_ID, intent,
|
||||||
PendingIntent.FLAG_UPDATE_CURRENT);
|
PendingIntent.FLAG_UPDATE_CURRENT);
|
||||||
|
Loading…
Reference in New Issue
Block a user