mirror of
https://bitbucket.org/TheBosZ/cordova-plugin-run-in-background
synced 2024-11-25 16:54: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',
|
title: 'App is running in background',
|
||||||
text: 'Doing heavy tasks.',
|
text: 'Doing heavy tasks.',
|
||||||
ticker: 'App is running in background',
|
ticker: 'App is running in background',
|
||||||
resume: true
|
resume: true,
|
||||||
|
enable: true
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -79,6 +80,8 @@ exports.configure = function (options) {
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
cordova.exec(null, null, 'BackgroundMode', 'configure', [settings]);
|
cordova.exec(null, null, 'BackgroundMode', 'configure', [settings]);
|
||||||
|
|
||||||
|
settings.enable ? this.enable() : this.disable();
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
Reference in New Issue
Block a user