From ffd81e00c264ced79fe303f706bc533eb4a68c96 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebasti=C3=A1n=20Katzer?= Date: Wed, 12 Nov 2014 23:04:01 +0100 Subject: [PATCH] Disabled by default --- src/android/BackgroundMode.java | 3 +-- src/ios/APPBackgroundMode.m | 3 ++- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/android/BackgroundMode.java b/src/android/BackgroundMode.java index 2144cae..0aa95e8 100644 --- a/src/android/BackgroundMode.java +++ b/src/android/BackgroundMode.java @@ -41,7 +41,7 @@ public class BackgroundMode extends CordovaPlugin { private boolean inBackground = false; // Flag indicates if the plugin is enabled or disabled - private boolean isDisabled = false; + private boolean isDisabled = true; // Flag indicates if the service is bind private boolean isBind = false; @@ -61,7 +61,6 @@ public class BackgroundMode extends CordovaPlugin { @Override public void onServiceDisconnected(ComponentName name) { Log.w("BackgroundMode", "Service disrupted"); - //stopService(); } }; diff --git a/src/ios/APPBackgroundMode.m b/src/ios/APPBackgroundMode.m index a99f9f3..e6a940f 100644 --- a/src/ios/APPBackgroundMode.m +++ b/src/ios/APPBackgroundMode.m @@ -31,7 +31,7 @@ */ - (void) pluginInitialize { - [self enable:NULL]; + [self disable:NULL]; [self configureAudioPlayer]; [self configureAudioSession]; } @@ -61,6 +61,7 @@ object:nil]; } else { + [self enable:NULL]; [self keepAwake]; } }