Allow enable/disable the plug in through configure

This commit is contained in:
Sebastián Katzer 2014-11-04 17:46:27 +00:00
parent 15807233a8
commit 02770739b5

View File

@ -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();
};
/**