From 02770739b54993cbabb1415779667314aea47890 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebasti=C3=A1n=20Katzer?= Date: Tue, 4 Nov 2014 17:46:27 +0000 Subject: [PATCH] Allow enable/disable the plug in through configure --- www/background-mode.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/www/background-mode.js b/www/background-mode.js index 7b0931b..403aeb4 100644 --- a/www/background-mode.js +++ b/www/background-mode.js @@ -44,7 +44,8 @@ exports.getDefaults = function () { title: 'App is running in background', text: 'Doing heavy tasks.', ticker: 'App is running in background', - resume: true + resume: true, + enable: true }; }; @@ -79,6 +80,8 @@ exports.configure = function (options) { return; cordova.exec(null, null, 'BackgroundMode', 'configure', [settings]); + + settings.enable ? this.enable() : this.disable(); }; /**