diff --git a/package.json b/package.json index 8e0f22b..750ffce 100644 --- a/package.json +++ b/package.json @@ -12,6 +12,7 @@ "dependencies": { "cordova-browser": "^6.0.0", "cordova-plugin-app-version": "^0.1.9", + "cordova-plugin-device": "^2.0.2", "cordova-plugin-geolocation": "^4.0.1", "cordova-plugin-headercolor": "^1.0.0", "cordova-plugin-inappbrowser": "^3.0.0", @@ -33,7 +34,8 @@ "cordova-plugin-inappbrowser": {}, "cordova-plugin-transparent-status-bar": {}, "cordova-plugin-geolocation": {}, - "cordova-plugin-splashscreen": {} + "cordova-plugin-splashscreen": {}, + "cordova-plugin-device": {} }, "platforms": [ "android", diff --git a/www/code-credits.txt b/www/code-credits.txt index d6a7e16..7a92534 100644 --- a/www/code-credits.txt +++ b/www/code-credits.txt @@ -2553,7 +2553,7 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ----- -The following software may be included in this product: cordova-plugin-geolocation, cordova-plugin-inappbrowser, cordova-plugin-splashscreen, cordova-plugin-statusbar, cordova-plugin-whitelist. A copy of the source code may be downloaded from https://github.com/apache/cordova-plugin-geolocation (cordova-plugin-geolocation), https://github.com/apache/cordova-plugin-inappbrowser (cordova-plugin-inappbrowser), https://github.com/apache/cordova-plugin-splashscreen (cordova-plugin-splashscreen), https://github.com/apache/cordova-plugin-statusbar (cordova-plugin-statusbar), https://github.com/apache/cordova-plugin-whitelist (cordova-plugin-whitelist). This software contains the following license and notice below: +The following software may be included in this product: cordova-plugin-device, cordova-plugin-geolocation, cordova-plugin-inappbrowser, cordova-plugin-splashscreen, cordova-plugin-statusbar, cordova-plugin-whitelist. A copy of the source code may be downloaded from https://github.com/apache/cordova-plugin-device (cordova-plugin-device), https://github.com/apache/cordova-plugin-geolocation (cordova-plugin-geolocation), https://github.com/apache/cordova-plugin-inappbrowser (cordova-plugin-inappbrowser), https://github.com/apache/cordova-plugin-splashscreen (cordova-plugin-splashscreen), https://github.com/apache/cordova-plugin-statusbar (cordova-plugin-statusbar), https://github.com/apache/cordova-plugin-whitelist (cordova-plugin-whitelist). This software contains the following license and notice below: Apache License Version 2.0, January 2004 diff --git a/www/js/platform.js b/www/js/platform.js index e22ccbb..0833f41 100644 --- a/www/js/platform.js +++ b/www/js/platform.js @@ -113,6 +113,15 @@ function initCordova() { } ); } + + // When running on Android 8.0 (not 7.1.1, not 8.1, just 8.0), the statusbar + // height is incorrectly set to 0px, causing the clock and icons to overlap + // on the TerranQuest UI. + document.addEventListener("deviceready", function () { + if (device.platform == "Android" && device.version == "8.0.0" && getComputedStyle(document.documentElement).getPropertyValue('--f7-statusbar-height') == "0px") { + document.documentElement.style.setProperty('--f7-statusbar-height', '24px'); + } + }, false); } function initNW() {