Hintergrundmodus kann gesondert aktiviert bzw. deaktiviert werden

This commit is contained in:
Sebastián Katzer
2013-10-09 11:40:06 +02:00
parent 68fa900cfb
commit 20cc5084f4
3 changed files with 62 additions and 20 deletions

View File

@@ -8,11 +8,14 @@
*/
var BackgroundMode = function () {
// Registriert die Listener für die (sleep/resume) Events
cordova.exec(null, null, 'BackgroundMode', 'observeLifeCycle', []);
};
BackgroundMode.prototype = {
/**
* @public
*
* Aktiviert den Hintergrundmodus.
*/
activate: function () {
@@ -20,9 +23,11 @@ BackgroundMode.prototype = {
},
/**
* @public
*
* Deaktiviert den Hintergrundmodus
*/
deactivate: function (badge) {
deactivate: function () {
cordova.exec(null, null, 'BackgroundMode', 'deactivate', []);
}
};