mirror of
https://bitbucket.org/TheBosZ/cordova-plugin-run-in-background
synced 2024-11-22 07:14:54 +00:00
Allow enable/disable the plug in through configure
This commit is contained in:
parent
15807233a8
commit
02770739b5
@ -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();
|
||||
};
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user