Friday, 29 November 2019

Cordova Android Will Not Display StatusBar

I have an issue I have been trying to solve, none of the solutions online I have seen have helped either.

Very simple, so you think the solution would be as well. On the Android platform for Cordova build I am using the StatusBar plugin which is set in the config.xml to preference and DISPLAY it...Yes, I am trying to get it to display in the app and not hide. It seems to be hidden every time the app runs.

In my InAppBrowser option string, I also set fullscreen=no so that that won't affect it either.

Running the app in the simulator and on-device both hide it still. Would someone possibly know a solution to FORCE the status bar to show and if not, what are the causes of this?

onDeviceReady: function() {
StatusBar.overlaysWebView(true);
    //InAppBrowser Init
    var options = "location=no,fullscreen=no,zoom=no"
    Browser = cordova.InAppBrowser.open('http://www.app.example', '_self', options);

The StatusBar plugin is also being imported correctly and can be seen here, this was done via plugman:

enter image description here

Here is my Config.xml file for better supporting information:

<?xml version='1.0' encoding='utf-8'?>
<widget id="com.pulse_co" version="1.0.0" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0">
<feature name="Notification">
    <param name="android-package" value="org.apache.cordova.dialogs.Notification" />
</feature>
<feature name="InAppBrowser">
    <param name="android-package" value="org.apache.cordova.inappbrowser.InAppBrowser" />
</feature>
<feature name="NetworkStatus">
    <param name="android-package" value="org.apache.cordova.networkinformation.NetworkManager" />
</feature>
<feature name="Whitelist">
    <param name="android-package" value="org.apache.cordova.whitelist.WhitelistPlugin" />
    <param name="onload" value="true" />
</feature>
<feature name="OneSignalPush">
    <param name="android-package" value="com.plugin.gcm.OneSignalPush" />
</feature>

<name>Pulse</name>
<description>
    Add Pulse App Description Here
</description>
<author email="email@test.com" href="https://support.example.com">
    Team
</author>
<content src="index.html" />
<access origin="https://root.domain.co*" />
<allow-intent href="http://*/*" />
<allow-intent href="https://*/*" />
<allow-intent href="tel:*" />
<allow-intent href="sms:*" />
<allow-intent href="mailto:*" />
<allow-intent href="geo:*" />
<allow-intent href="market:*" />
<preference name="loglevel" value="DEBUG" />
<preference name="StatusBarOverlaysWebView" value="true" />
<feature name="StatusBar">
    <param name="android-package" value="org.apache.cordova.statusbar.StatusBar" />
    <param name="onload" value="true" />
</feature>


from Cordova Android Will Not Display StatusBar

No comments:

Post a Comment