Remove run in background

Skylar Ittner 3 years ago
parent 0d83edcf74
commit fd14386270

@ -22,19 +22,21 @@
"cordova": { "cordova": {
"plugins": { "plugins": {
"cordova-plugin-geolocation": {}, "cordova-plugin-geolocation": {},
"cordova-plugin-inappbrowser": {},
"cordova-plugin-powermanagement-netsyms": {}, "cordova-plugin-powermanagement-netsyms": {},
"cordova-plugin-whitelist": {},
"phonegap-plugin-barcodescanner": {},
"cordova-plugin-device": {}, "cordova-plugin-device": {},
"cordova-plugin-battery-status": {}, "cordova-plugin-battery-status": {},
"cordova-plugin-statusbar": {}, "cordova-plugin-statusbar": {},
"cordova-plugin-inappbrowser": {},
"cordova-plugin-headercolor": {}, "cordova-plugin-headercolor": {},
"cordova-plugin-foreground-service": {} "cordova-plugin-whitelist": {},
"phonegap-plugin-barcodescanner": {
"ANDROID_SUPPORT_V4_VERSION": "27.+"
}
}, },
"platforms": [ "platforms": [
"browser", "browser",
"android" "android",
"ios"
] ]
}, },
"dependencies": { "dependencies": {
@ -42,13 +44,12 @@
"cordova-browser": "^6.0.0", "cordova-browser": "^6.0.0",
"cordova-plugin-battery-status": "^2.0.3", "cordova-plugin-battery-status": "^2.0.3",
"cordova-plugin-device": "^2.0.3", "cordova-plugin-device": "^2.0.3",
"cordova-plugin-headercolor": "^1.0.0",
"cordova-plugin-inappbrowser": "^3.1.0",
"cordova-plugin-powermanagement-netsyms": "git+https://source.netsyms.com/Netsyms/cordova-plugin-powermanagement", "cordova-plugin-powermanagement-netsyms": "git+https://source.netsyms.com/Netsyms/cordova-plugin-powermanagement",
"cordova-plugin-statusbar": "^2.4.3", "cordova-plugin-statusbar": "^2.4.3"
"cordova-plugin-whitelist": "^1.3.4"
}, },
"devDependencies": { "devDependencies": {
"cordova-plugin-foreground-service": "^1.1.3" "cordova-ios": "^6.1.1",
"cordova-plugin-inappbrowser": "^4.1.0",
"phonegap-plugin-barcodescanner": "^8.1.0"
} }
} }

@ -169,9 +169,9 @@ function initCordova() {
}); });
} }
if (getStorage("runinbackground") == "true") { // if (getStorage("runinbackground") == "true") {
cordova.plugins.foregroundService.start('PackageHelper', 'GPS active'); // cordova.plugins.foregroundService.start('PackageHelper', 'GPS active');
} // }
// Make sure the status bar color is set properly // Make sure the status bar color is set properly
applyColorTheme(); applyColorTheme();

@ -101,11 +101,11 @@ function loadSettings() {
}); });
} }
if (getStorage("runinbackground") == "true") { // if (getStorage("runinbackground") == "true") {
cordova.plugins.foregroundService.start('PackageHelper', 'GPS active'); // cordova.plugins.foregroundService.start('PackageHelper', 'GPS active');
} else { // } else {
cordova.plugins.foregroundService.stop(); // cordova.plugins.foregroundService.stop();
} // }
} }
} }

@ -529,7 +529,8 @@ var routes = [
checked: getStorage("hardwarescanner") == "true", checked: getStorage("hardwarescanner") == "true",
onclick: "" onclick: ""
}); });
if (platform_type == "cordova" && cordova.platformId != "browser") { // disable this because it's broken
if (false && platform_type == "cordova" && cordova.platformId != "browser") {
settings.push({ settings.push({
setting: "runinbackground", setting: "runinbackground",
title: "Run in background", title: "Run in background",

Loading…
Cancel
Save