Some adjustments

Skylar Ittner 3 years ago
parent de2acf34f7
commit 36a43c9ba9

@ -155,6 +155,15 @@ function initCordova() {
// Handle back button to close things
document.addEventListener("backbutton", handleBackButton, false);
document.addEventListener("deviceready", function () {
// Make sure the status bar color is set properly
applyColorTheme();
// start watching user position after everything's done, hopefully this will make it work
// with ios
setupPositionWatcher();
try {
if (getStorage("wakelock") == "true") {
window.powerManagement.acquire(function () {
console.log("Info", 'Wakelock acquired');
@ -168,13 +177,9 @@ function initCordova() {
console.log("Warn", 'Failed to release wakelock');
});
}
// Make sure the status bar color is set properly
applyColorTheme();
// start watching user position after everything's done, hopefully this will make it work
// with ios
setupPositionWatcher();
} catch (ex) {
console.log("Warn", 'Failed to configure wakelock', ex);
}
}, false);
openBrowser = function (url) {
cordova.InAppBrowser.open(url, '_blank', 'location=yes');

Loading…
Cancel
Save