Ionic - the application runs in full screen on Android without any reason

I have an ion hybrid mobile app. After a recent build, I noticed that my application becomes full-screen (state visibility) after starting for no reason. The first point is the Google map, and when it is loaded, ionic.Platform.fullScreen (false, true); called. This is due to the fact that if the user first opens the application, a full-screen introduction appears, then the user goes to the map, which should not be full-screen. If this transition occurs (input will take effect), everything will be fine, but if the user opens the second application + time (without input), then the card will receive full-screen mode and the status bar will be visible, so half of the title will be closed.

status bar is hidden

Android. Cordova CLI, cordova-andoid (- splashscreen) Linux. : 6.0.0, 6.4.0, 6.5.0; -: 6.0.0, 6.2.1., 6.2.2, 6.2.3

, , , , .

:

Cordova CLI: 6.0.0
Gulp version:  CLI version 3.9.1
Gulp local:   Local version 3.9.1
Ionic Framework Version: 1.3.0
Ionic CLI Version: 1.7.16
Ionic App Lib Version: 0.7.3
OS: Distributor ID: Ubuntu Description: Ubuntu 17.04 
Node Version: v4.4.0

!

UPDATE: config.xml

<?xml version='1.0' encoding='utf-8'?>
<widget id="com.myapp" version="0.8.2" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0">
    <name>MyApp</name>
    <description>
        My desc.
    </description>
    <author email="developers@me.com" href="http://myapp.com/">
        MyApp Co.
  </author>
    <content src="index.html" />
    <access origin="*" />
    <access launch-external="yes" origin="tel:*" />
    <allow-intent href="tel:*" />
    <plugin name="Geolocation" value="CDVLocation" />
    <plugin name="cordova-plugin-network-information" spec="~1.2.1" />
    <preference name="webviewbounce" value="false" />
    <preference name="UIWebViewBounce" value="false" />
    <preference name="DisallowOverscroll" value="true" />
    <preference name="android-minSdkVersion" value="16" />
    <preference name="BackupWebStorage" value="none" />
    <preference name="SplashScreen" value="screen" />
    <preference name="SplashScreenDelay" value="7000" />
    <preference name="FadeSplashScreenDuration" value="1000" />
    <preference name="xwalkVersion" value="19+" />
    <preference name="xwalkCommandLine" value="--disable-pull-to-refresh-effect" />
    <preference name="xwalkMode" value="embedded" />
    <preference name="xwalkMultipleApk" value="true" />
    <preference name="StatusBarStyle" value="default" />
    <feature name="StatusBar">
        <param name="ios-package" onload="true" value="CDVStatusBar" />
    </feature>
    <hook src="hooks/before_build/010_some_hook.js" type="before_build" />
    <hook src="hooks/after_prepare/020_other_hook.js" type="after_prepare" />
    <platform name="android">
        <splash density="port-ldpi" src="resources/android/splash/drawable-port-ldpi-screen.png" />
        <splash density="port-mdpi" src="resources/android/splash/drawable-port-mdpi-screen.png" />
        <splash density="port-hdpi" src="resources/android/splash/drawable-port-hdpi-screen.png" />
        <splash density="port-xhdpi" src="resources/android/splash/drawable-port-xhdpi-screen.png" />
        <splash density="port-xxhdpi" src="resources/android/splash/drawable-port-xxhdpi-screen.png" />
        <splash density="port-xxxhdpi" src="resources/android/splash/drawable-port-xxxhdpi-screen.png" />
        <icon density="ldpi" src="resources/android/icon/drawable-ldpi-icon.png" />
        <icon density="mdpi" src="resources/android/icon/drawable-mdpi-icon.png" />
        <icon density="hdpi" src="resources/android/icon/drawable-hdpi-icon.png" />
        <icon density="xhdpi" src="resources/android/icon/drawable-xhdpi-icon.png" />
        <icon density="xxhdpi" src="resources/android/icon/drawable-xxhdpi-icon.png" />
        <icon density="xxxhdpi" src="resources/android/icon/drawable-xxxhdpi-icon.png" />
    </platform>
    <platform name="ios">
        <splash height="1136" src="resources/ios/splash/Default-568h@2x~iphone.png" width="640" />
        <splash height="1334" src="resources/ios/splash/Default-667h.png" width="750" />
        <splash height="2208" src="resources/ios/splash/Default-736h.png" width="1242" />
        <splash height="2048" src="resources/ios/splash/Default-Portrait@2x~ipad.png" width="1536" />
        <splash height="2732" src="resources/ios/splash/Default-Portrait@~ipadpro.png" width="2048" />
        <splash height="1024" src="resources/ios/splash/Default-Portrait~ipad.png" width="768" />
        <splash height="960" src="resources/ios/splash/Default@2x~iphone.png" width="640" />
        <splash height="480" src="resources/ios/splash/Default~iphone.png" width="320" />
        <icon height="57" src="resources/ios/icon/icon.png" width="57" />
        <icon height="114" src="resources/ios/icon/icon@2x.png" width="114" />
        <icon height="40" src="resources/ios/icon/icon-40.png" width="40" />
        <icon height="80" src="resources/ios/icon/icon-40@2x.png" width="80" />
        <icon height="120" src="resources/ios/icon/icon-40@3x.png" width="120" />
        <icon height="50" src="resources/ios/icon/icon-50.png" width="50" />
        <icon height="100" src="resources/ios/icon/icon-50@2x.png" width="100" />
        <icon height="60" src="resources/ios/icon/icon-60.png" width="60" />
        <icon height="120" src="resources/ios/icon/icon-60@2x.png" width="120" />
        <icon height="180" src="resources/ios/icon/icon-60@3x.png" width="180" />
        <icon height="72" src="resources/ios/icon/icon-72.png" width="72" />
        <icon height="144" src="resources/ios/icon/icon-72@2x.png" width="144" />
        <icon height="76" src="resources/ios/icon/icon-76.png" width="76" />
        <icon height="152" src="resources/ios/icon/icon-76@2x.png" width="152" />
        <icon height="167" src="resources/ios/icon/icon-83.5@2x.png" width="167" />
        <icon height="29" src="resources/ios/icon/icon-small.png" width="29" />
        <icon height="58" src="resources/ios/icon/icon-small@2x.png" width="58" />
        <icon height="87" src="resources/ios/icon/icon-small@3x.png" width="87" />
    </platform>
    <icon src="resources/android/icon/drawable-xhdpi-icon.png" />
    <plugin name="cordova-plugin-fcm" spec="~2.1.1" />
    <plugin name="cordova-plugin-inappbrowser" spec="~1.7.0" />
    <engine name="android" spec="~6.2.1" />
    <engine name="ios" spec="~4.3.1" />
    <plugin name="cordova-plugin-facebook4" spec="~1.7.4">
        <variable name="APP_ID" value="myid" />
        <variable name="APP_NAME" value="MyApp" />
    </plugin>
</widget>

, :

"cordovaPlugins": [
  "cordova-plugin-geolocation",
  "cordova-plugin-whitelist",
  "cordova-plugin-crosswalk-webview",
  "cordova-plugin-splashscreen",
  "cordova-plugin-statusbar",
  "cordova-plugin-fcm",
  "uk.co.workingedge.phonegap.plugin.launchnavigator",
  "cordova-plugin-x-toast",
  {
    "variables": {
      "FABRIC_API_KEY": "mykey",
      "FABRIC_API_SECRET": "mysecret"
    },
    "locator": "cordova-fabric-plugin@1.1.1",
    "id": "cordova-fabric-plugin@1.1.1"
  },
  "cordova-plugin-device",
  "cordova-plugin-network-information",
  "cordova-plugin-inappbrowser",
  {
    "variables": {
      "APP_ID": "myid",
      "APP_NAME": "myapp"
    },
    "locator": "cordova-plugin-facebook4",
    "id": "cordova-plugin-facebook4"
  },
  "cordova-plugin-screen-orientation"
]
+4
1

<preference name="StatusBarOverlaysWebView" value="false" /> config.xml StatusBar.overlaysWebView(false); , .

+2

Source: https://habr.com/ru/post/1677696/


All Articles