Call configure only for Android
This commit is contained in:
parent
a7e11b7c0e
commit
dd6ed1a183
@ -26,10 +26,10 @@ var exec = require('cordova/exec'),
|
||||
// Override back button action to prevent being killed
|
||||
document.addEventListener('backbutton', function () {}, false);
|
||||
|
||||
channel.deviceready.subscribe( function () {
|
||||
channel.deviceready.subscribe(function () {
|
||||
// Registriert die Listener für die (sleep/resume) Events
|
||||
cordova.exec(null, null, 'BackgroundMode', 'observeLifeCycle', []);
|
||||
|
||||
// Set the default settings
|
||||
exports.configure();
|
||||
});
|
||||
|
||||
@ -75,6 +75,9 @@ exports.disable = function () {
|
||||
exports.configure = function (options) {
|
||||
var settings = this.mergeWithDefaults(options || {});
|
||||
|
||||
if (device.platform != 'Android')
|
||||
return;
|
||||
|
||||
cordova.exec(null, null, 'BackgroundMode', 'configure', [settings]);
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user