try to allow background process

This commit is contained in:
Marc Wäckerlin
2015-11-20 14:05:16 +00:00
parent 4932c8f348
commit ed8f0bb759
5 changed files with 36 additions and 0 deletions

View File

@@ -692,5 +692,13 @@ $(window.onunload = function() { // you probably don't want to leave now...
alert('You are trying to leave.');
return false;
});
/// Allow Running in Background on Android
document.addEventListener('deviceready', function () {
if (cordova && cordova.plugins.backgroundMode) {
cordova.plugins.backgroundMode.enable();
}
}, false);
/// Start Main Loop
$(start);