mirror of
https://bitbucket.org/TheBosZ/cordova-plugin-run-in-background
synced 2025-12-13 01:43:24 +00:00
Added js interface
This commit is contained in:
32
www/background-mode.js
Normal file
32
www/background-mode.js
Normal file
@@ -0,0 +1,32 @@
|
||||
/**
|
||||
* background-mode.js
|
||||
* Cordova Background-Mode Plugin
|
||||
*
|
||||
* Created by Sebastian Katzer (github.com/katzer) on 09/10/2013.
|
||||
* Copyright 2013 Sebastian Katzer. All rights reserved.
|
||||
* GPL v2 licensed
|
||||
*/
|
||||
|
||||
var BackgroundMode = function () {
|
||||
|
||||
};
|
||||
|
||||
Badge.prototype = {
|
||||
/**
|
||||
* Aktiviert den Hintergrundmodus.
|
||||
*/
|
||||
activate: function () {
|
||||
cordova.exec(null, null, 'BackgroundMode', 'activate', []);
|
||||
},
|
||||
|
||||
/**
|
||||
* Deaktiviert den Hintergrundmodus
|
||||
*/
|
||||
deactivate: function (badge) {
|
||||
cordova.exec(null, null, 'BackgroundMode', 'deactivate', []);
|
||||
}
|
||||
};
|
||||
|
||||
var plugin = new BackgroundMode();
|
||||
|
||||
module.exports = plugin;
|
||||
Reference in New Issue
Block a user