Call configure only for Android

This commit is contained in:
Sebastián Katzer 2014-11-04 14:57:23 +00:00
parent a7e11b7c0e
commit dd6ed1a183

View File

@ -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]);
};